Add rspec code

to test two node deployment scenarios for rhel
and ubuntu
This commit is contained in:
Dan Bode
2012-12-10 21:57:23 -08:00
parent fb4604468f
commit ca997e8346

51
spec/test_two_node.rb Normal file
View File

@@ -0,0 +1,51 @@
require File.join(
File.dirname(__FILE__),
'..',
'lib',
'puppetlabs',
'os_tester'
)
describe 'test various two node configurations' do
def base_dir
File.join(File.dirname(__FILE__), '..')
end
include Puppetlabs::OsTester
before :each do
cmd_system('vagrant destroy -f')
end
describe 'test redhat' do
before :each do
update_vagrant_os('redhat')
end
it 'should be able to build out a two node environment' do
deploy_two_node
result = on_box('openstack_controller', 'sudo bash /tmp/test_nova.sh;exit $?')
result.split("\n").last.should == 'cirros'
end
end
describe 'test ubuntu' do
before :each do
update_vagrant_os('ubuntu')
end
it 'should be able to build out a two node environment' do
deploy_two_node
result = on_box('openstack_controller', 'sudo bash /tmp/test_nova.sh;exit $?')
result.split("\n").last.should == 'cirros'
end
end
after :all do
end
end