Skip to content

Commit

Permalink
update SNAPSHOT tests to run
Browse files Browse the repository at this point in the history
  • Loading branch information
talevy authored and Pere Urbon-Bayes committed May 10, 2016
1 parent 0a6720c commit a4fa8dd
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 23 deletions.
16 changes: 2 additions & 14 deletions qa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 3 additions & 5 deletions qa/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion qa/acceptance/spec/centos/lib/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion qa/acceptance/spec/debian/lib/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions qa/platforms.json
Original file line number Diff line number Diff line change
@@ -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" }
}
File renamed without changes.
File renamed without changes.

0 comments on commit a4fa8dd

Please sign in to comment.