acceptance: update serverspec syntax
Since we unpin beaker, serverspec is now 2.18.0 (before it was 1.16.0) so we need to update some syntax to make the tests work. Change-Id: Ie097f951123501f42e1a85abb81d2de556c4f749
This commit is contained in:
@@ -25,8 +25,10 @@ describe 'openstacklib mysql' do
|
||||
it { is_expected.to be_listening.with('tcp') }
|
||||
end
|
||||
|
||||
describe command("mysql -e 'show databases;' | grep -q beaker") do
|
||||
it { should return_exit_status 0 }
|
||||
describe 'test database listing' do
|
||||
it 'should list beaker database' do
|
||||
expect(shell("mysql -e 'show databases;'|grep -q beaker").exit_code).to be_zero
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
@@ -47,13 +47,19 @@ describe 'openstacklib class' do
|
||||
apply_manifest(pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
describe command("rabbitmqctl list_users") do
|
||||
it { should return_stdout /^beaker/ }
|
||||
it { should_not return_stdout /^guest/ }
|
||||
end
|
||||
describe 'test rabbitmq resources' do
|
||||
it 'should list rabbitmq beaker resources' do
|
||||
shell('rabbitmqctl list_users') do |r|
|
||||
expect(r.stdout).to match(/^beaker/)
|
||||
expect(r.stdout).not_to match(/^guest/)
|
||||
expect(r.exit_code).to eq(0)
|
||||
end
|
||||
|
||||
describe command('rabbitmqctl list_permissions') do
|
||||
it { should return_stdout /^beaker\t\.\*\t\.\*\t\.\*$/ }
|
||||
shell('rabbitmqctl list_permissions') do |r|
|
||||
expect(r.stdout).to match(/^beaker\t\.\*\t\.\*\t\.\*$/)
|
||||
expect(r.exit_code).to eq(0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user