diff --git a/rakelib/test.rake b/rakelib/test.rake index 8c0d16ff4ef..fb2dad658ab 100644 --- a/rakelib/test.rake +++ b/rakelib/test.rake @@ -24,7 +24,7 @@ namespace "test" do # logstash-core-event specs since currently this is the most complete Event and Timestamp specs # which actually defines the Event contract and should pass regardless of the actuall underlying # implementation. - specs = ["spec/**/*_spec.rb", "logstash-core/spec/**/*_spec.rb", "logstash-core-event/spec/**/*_spec.rb"] + specs = ["spec/unit/**/*_spec.rb", "logstash-core/spec/**/*_spec.rb", "logstash-core-event/spec/**/*_spec.rb"] # figure if the logstash-core-event-java gem is loaded and if so add its specific specs in the core specs to run begin @@ -112,7 +112,7 @@ namespace "test" do integration_path = File.join(source, "integration_run") FileUtils.rm_rf(integration_path) - exit(RSpec::Core::Runner.run([Rake::FileList["integration/**/*_spec.rb"]])) + exit(RSpec::Core::Runner.run([Rake::FileList["spec/integration/**/*_spec.rb"]])) end namespace "integration" do @@ -124,7 +124,7 @@ namespace "test" do FileUtils.mkdir_p(integration_path) puts "[integration_spec] configuring local environment for running test in #{integration_path}, if you want to change this behavior delete the directory." - exit(RSpec::Core::Runner.run([Rake::FileList["integration/**/*_spec.rb"]])) + exit(RSpec::Core::Runner.run([Rake::FileList["spec/integration/**/*_spec.rb"]])) end end end diff --git a/integration/logstash_config/file_input_to_file_output_spec.rb b/spec/integration/logstash_config/file_input_to_file_output_spec.rb similarity index 100% rename from integration/logstash_config/file_input_to_file_output_spec.rb rename to spec/integration/logstash_config/file_input_to_file_output_spec.rb diff --git a/integration/plugin_manager/logstash_spec.rb b/spec/integration/plugin_manager/logstash_spec.rb similarity index 81% rename from integration/plugin_manager/logstash_spec.rb rename to spec/integration/plugin_manager/logstash_spec.rb index f7047e986a2..3f839f060f2 100644 --- a/integration/plugin_manager/logstash_spec.rb +++ b/spec/integration/plugin_manager/logstash_spec.rb @@ -1,6 +1,6 @@ # Encoding: utf-8 require_relative "../spec_helper" -require_relative "../../logstash-core/lib/logstash/version" +require_relative "../../../logstash-core/lib/logstash/version" describe "bin/logstash" do it "returns the logstash version" do diff --git a/integration/plugin_manager/plugin_install_spec.rb b/spec/integration/plugin_manager/plugin_install_spec.rb similarity index 100% rename from integration/plugin_manager/plugin_install_spec.rb rename to spec/integration/plugin_manager/plugin_install_spec.rb diff --git a/integration/plugin_manager/plugin_list_spec.rb b/spec/integration/plugin_manager/plugin_list_spec.rb similarity index 100% rename from integration/plugin_manager/plugin_list_spec.rb rename to spec/integration/plugin_manager/plugin_list_spec.rb diff --git a/integration/plugin_manager/plugin_uninstall_spec.rb b/spec/integration/plugin_manager/plugin_uninstall_spec.rb similarity index 100% rename from integration/plugin_manager/plugin_uninstall_spec.rb rename to spec/integration/plugin_manager/plugin_uninstall_spec.rb diff --git a/integration/plugin_manager/plugin_update_spec.rb b/spec/integration/plugin_manager/plugin_update_spec.rb similarity index 100% rename from integration/plugin_manager/plugin_update_spec.rb rename to spec/integration/plugin_manager/plugin_update_spec.rb diff --git a/integration/spec_helper.rb b/spec/integration/spec_helper.rb similarity index 94% rename from integration/spec_helper.rb rename to spec/integration/spec_helper.rb index f4cddfa713d..065c812411f 100644 --- a/integration/spec_helper.rb +++ b/spec/integration/spec_helper.rb @@ -1,6 +1,6 @@ # encoding: utf-8 require_relative "support/integration_test_helpers" -require_relative "../logstash-core/lib/logstash/environment" +require_relative "../../logstash-core/lib/logstash/environment" require "fileutils" if LogStash::Environment.windows? @@ -9,7 +9,7 @@ end # Configure the test environment -source = File.expand_path(File.join(File.dirname(__FILE__), "..")) +source = File.expand_path(File.join(File.dirname(__FILE__), "..", "..")) integration_path = File.join(source, "integration_run") puts "[integration_spec] configure environment" diff --git a/integration/support/integration_test_helpers.rb b/spec/integration/support/integration_test_helpers.rb similarity index 100% rename from integration/support/integration_test_helpers.rb rename to spec/integration/support/integration_test_helpers.rb diff --git a/integration/support/sample.log b/spec/integration/support/sample.log similarity index 100% rename from integration/support/sample.log rename to spec/integration/support/sample.log diff --git a/spec/bootstrap/bundler_spec.rb b/spec/unit/bootstrap/bundler_spec.rb similarity index 100% rename from spec/bootstrap/bundler_spec.rb rename to spec/unit/bootstrap/bundler_spec.rb diff --git a/spec/license_spec.rb b/spec/unit/license_spec.rb similarity index 100% rename from spec/license_spec.rb rename to spec/unit/license_spec.rb diff --git a/spec/plugin_manager/gemfile_spec.rb b/spec/unit/plugin_manager/gemfile_spec.rb similarity index 100% rename from spec/plugin_manager/gemfile_spec.rb rename to spec/unit/plugin_manager/gemfile_spec.rb diff --git a/spec/plugin_manager/install_spec.rb b/spec/unit/plugin_manager/install_spec.rb similarity index 100% rename from spec/plugin_manager/install_spec.rb rename to spec/unit/plugin_manager/install_spec.rb diff --git a/spec/plugin_manager/update_spec.rb b/spec/unit/plugin_manager/update_spec.rb similarity index 100% rename from spec/plugin_manager/update_spec.rb rename to spec/unit/plugin_manager/update_spec.rb diff --git a/spec/plugin_manager/util_spec.rb b/spec/unit/plugin_manager/util_spec.rb similarity index 100% rename from spec/plugin_manager/util_spec.rb rename to spec/unit/plugin_manager/util_spec.rb diff --git a/spec/util/compress_spec.rb b/spec/unit/util/compress_spec.rb similarity index 100% rename from spec/util/compress_spec.rb rename to spec/unit/util/compress_spec.rb diff --git a/spec/util/retryable_spec.rb b/spec/unit/util/retryable_spec.rb similarity index 100% rename from spec/util/retryable_spec.rb rename to spec/unit/util/retryable_spec.rb