Adapt spec_helper_acceptance to work with CentOS
This patch adapts spec_helper_acceptance to work on CentOS containers. Also fixed indentation Change-Id: I185473efab30d0b1bcd8ef28d88fdfa18d79591e
This commit is contained in:
parent
825aed2c93
commit
44f0bbe723
@ -2,29 +2,32 @@ require 'spec_helper_acceptance'
|
||||
|
||||
describe 'midonet all-in-one' do
|
||||
|
||||
context 'default parameters' do
|
||||
it 'should work with no errors' do
|
||||
pp = <<-EOS
|
||||
class { 'midonet': } ->
|
||||
exec { "/sbin/ip tuntap add mode tap testgateway": } ->
|
||||
context 'default parameters' do
|
||||
it 'should work with no errors' do
|
||||
pp = <<-EOS
|
||||
if empty($::augeasversion) {
|
||||
$augeasversion = '1.0.0'
|
||||
}
|
||||
class { 'midonet': } ->
|
||||
exec { "/sbin/ip tuntap add mode tap testgateway": } ->
|
||||
exec { "/usr/bin/midonet-cli -e 'create router name \\"MidoNet Provider Router\\"'": } ->
|
||||
midonet_gateway { $::hostname:
|
||||
ensure => present,
|
||||
midonet_api_url => 'http://127.0.0.1:8080/midonet-api',
|
||||
username => 'admin',
|
||||
password => 'admin',
|
||||
interface => 'testgateway',
|
||||
local_as => '64512',
|
||||
bgp_port => { 'port_address' => '198.51.100.2', 'net_prefix' => '198.51.100.0', 'net_length' => '30'},
|
||||
remote_peers => [{ 'as' => '64513', 'ip' => '198.51.100.1'},
|
||||
{ 'as' => '64513', 'ip' => '203.0.113.1'}],
|
||||
advertise_net => [{ 'net_prefix' => '192.0.2.0', 'net_length' => '24' }]
|
||||
}
|
||||
EOS
|
||||
midonet_gateway { $::hostname:
|
||||
ensure => present,
|
||||
midonet_api_url => 'http://127.0.0.1:8080/midonet-api',
|
||||
username => 'admin',
|
||||
password => 'admin',
|
||||
interface => 'testgateway',
|
||||
local_as => '64512',
|
||||
bgp_port => {'port_address' => '198.51.100.2', 'net_prefix' => '198.51.100.0', 'net_length' => '30'},
|
||||
remote_peers => [{ 'as' => '64513', 'ip' => '198.51.100.1'},
|
||||
{ 'as' => '64513', 'ip' => '203.0.113.1'}],
|
||||
advertise_net => [{ 'net_prefix' => '192.0.2.0', 'net_length' => '24' }]
|
||||
}
|
||||
EOS
|
||||
|
||||
# Run it twice for test the idempotency
|
||||
apply_manifest(pp)
|
||||
apply_manifest(pp)
|
||||
end
|
||||
end
|
||||
# Run it twice for test the idempotency
|
||||
apply_manifest(pp)
|
||||
apply_manifest(pp)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -18,6 +18,7 @@ RSpec.configure do |c|
|
||||
hosts.each do |host|
|
||||
copy_module_to(host, :source => proj_root, :module_name => 'midonet')
|
||||
scp_to(host, proj_root + '/data/hiera.yaml', "#{default['puppetpath']}/hiera.yaml")
|
||||
on host, 'mkdir -p /var/lib/hiera'
|
||||
scp_to(host, proj_root + '/data/common.yaml', "/var/lib/hiera")
|
||||
scp_to(host, proj_root + '/data/osfamily', "/var/lib/hiera")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user