diff --git a/qa/README.md b/qa/README.md index fe5f0308052..95811dd73ab 100644 --- a/qa/README.md +++ b/qa/README.md @@ -4,29 +4,17 @@ Welcome to the acceptance test framework for logstash, in this small readme we're going to describe it's features and the the necessary steps you will need to follow to setup your environment. -### Environment setup +### Environment setup and Running Tests This test are based on a collection of Vagrant defined VM's where the different test are going to be executed, so first setup necessary is to have vagrant properly available, see https://www.vagrantup.com/ for details on how to install it. -After you get vagrant installed, you will need to perform the next -setups: - -* Cd into the acceptance directory -* run the command `vagrant up`, this will provision all the machines - defined in the Vagrantfile (located in this directory). - -An alternative way would to run the task `rake test:setup` what will do -basically the same. - -When this process is done your test can be executed, to do that you will -need to: - _Inside the `qa` directory_ * Execute the command `bundle` this will pull the necessary dependencies in your environment. +* start your machines with `bundle exec test:setup` * Run `rake test:ssh_config` to dump the ssh configuration to access the different vagrant machines, this will generate a file named `.vm_ssh_config` that is going to be used for the tests. * Run `bundle exec rake test:acceptance:all` to run all acceptance test at once, there is also detailed tasks for platforms: diff --git a/qa/Rakefile b/qa/Rakefile index 3c38901bf2c..6c0a6e460c5 100644 --- a/qa/Rakefile +++ b/qa/Rakefile @@ -13,11 +13,9 @@ namespace :test do desc "Generate a valid ssh-config" task :ssh_config do require "json" - cd "acceptance" do - raw_ssh_config = LogStash::VagrantHelpers.fetch_config.stdout.split("\n"); - parsed_ssh_config = LogStash::VagrantHelpers.parse(raw_ssh_config) - File.write("../.vm_ssh_config", parsed_ssh_config.to_json) - end + raw_ssh_config = LogStash::VagrantHelpers.fetch_config.stdout.split("\n"); + parsed_ssh_config = LogStash::VagrantHelpers.parse(raw_ssh_config) + File.write(".vm_ssh_config", parsed_ssh_config.to_json) end desc "Bootstrap all the VM's used for this tests" diff --git a/qa/acceptance/spec/centos/lib/install_spec.rb b/qa/acceptance/spec/centos/lib/install_spec.rb index b0c9e3130ce..ceb9597c49e 100644 --- a/qa/acceptance/spec/centos/lib/install_spec.rb +++ b/qa/acceptance/spec/centos/lib/install_spec.rb @@ -7,7 +7,7 @@ shared_examples "installable" do |host, name| before(:each) do - install("/logstash-build/logstash-#{LOGSTASH_VERSION}.noarch.rpm", host) + install("/home/vagrant/logstash-latest-SNAPSHOT.rpm", host) end it "is installed on #{name}" do diff --git a/qa/acceptance/spec/debian/lib/install_spec.rb b/qa/acceptance/spec/debian/lib/install_spec.rb index 4b10baa6e5d..424c84f3482 100644 --- a/qa/acceptance/spec/debian/lib/install_spec.rb +++ b/qa/acceptance/spec/debian/lib/install_spec.rb @@ -7,7 +7,7 @@ shared_examples "installable" do |host, name| before(:each) do - install("/logstash-build/logstash-#{LOGSTASH_VERSION}_all.deb", host) + install("/home/vagrant/logstash-latest-SNAPSHOT.deb", host) end it "is installed on #{name}" do diff --git a/qa/platforms.json b/qa/platforms.json index b57e3b038bb..f97de63cbdd 100644 --- a/qa/platforms.json +++ b/qa/platforms.json @@ -1,6 +1,6 @@ { - "ubuntu-1204": { "box": "elastic/ubuntu-12.04-x86_64", "type": "ubuntu" }, - "ubuntu-1404": { "box": "elastic/ubuntu-14.04-x86_64", "type": "ubuntu" }, + "ubuntu-1204": { "box": "elastic/ubuntu-12.04-x86_64", "type": "debian" }, + "ubuntu-1404": { "box": "elastic/ubuntu-14.04-x86_64", "type": "debian" }, "centos-6": { "box": "elastic/centos-6-x86_64", "type": "centos" }, "centos-7": { "box": "elastic/centos-7-x86_64", "type": "centos" } } diff --git a/qa/sys/ubuntu/bootstrap.sh b/qa/sys/debian/bootstrap.sh similarity index 100% rename from qa/sys/ubuntu/bootstrap.sh rename to qa/sys/debian/bootstrap.sh diff --git a/qa/sys/ubuntu/user_bootstrap.sh b/qa/sys/debian/user_bootstrap.sh similarity index 100% rename from qa/sys/ubuntu/user_bootstrap.sh rename to qa/sys/debian/user_bootstrap.sh