rework the acceptance update scenario to avoid using snapshort restore, this might be a temporary solution for ssh issues in vagrant and ubuntu hosts

Fixes #5456
This commit is contained in:
Pere Urbon-Bayes 2016-06-07 13:56:40 +02:00
parent ed46e475ea
commit 6ae54801da

View file

@ -4,19 +4,22 @@ require 'logstash/version'
# This test checks if the current package could used to update from the latest version released.
RSpec.shared_examples "updated" do |logstash|
before (:all) { logstash.snapshot }
after (:all) { logstash.restore }
before(:all) { logstash.uninstall }
after(:all) do
logstash.stop_service # make sure the service is stopped
logstash.uninstall #remove the package to keep uniform state
end
it "can update on #{logstash.hostname}" do
logstash.install(LOGSTASH_LATEST_VERSION, "./")
expect(logstash).to be_installed
before(:each) do
logstash.install(LOGSTASH_LATEST_VERSION, "./") # make sure latest version is installed
end
it "can be updated an run on #{logstash.hostname}" do
# Performing the update
logstash.install(LOGSTASH_VERSION)
expect(logstash).to be_installed
end
it "can run on #{logstash.hostname}" do
# starts the service to be sure it runs after the upgrade
logstash.start_service
expect(logstash).to be_running
logstash.stop_service
end
end