update SNAPSHOT tests to run

Fixes #5350
This commit is contained in:
Tal Levy 2016-04-27 12:50:32 -07:00 committed by Pere Urbon-Bayes
parent 0afbb50cac
commit cffff49f2b
7 changed files with 9 additions and 23 deletions

View file

@ -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:

View file

@ -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"

View file

@ -7,7 +7,7 @@ describe "artifacts", :platform => :centos do
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

View file

@ -7,7 +7,7 @@ describe "artifacts", :platform => :debian do
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

View file

@ -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" }
}