Run migration over ssh spec tests

This change moves the ssh migration spec tests into the existing set of
shared_examples_for so they actually get run.

Change-Id: If9522a4f7dc42d0f1912eae25dfe5529b1233c39
This commit is contained in:
Alex Schultz 2017-04-17 16:37:41 -06:00
parent fd9a3550ee
commit 304a117c9d
1 changed files with 41 additions and 43 deletions

View File

@ -185,49 +185,6 @@ describe 'nova::migration::libvirt' do
end
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_address').with(:line => "listen_addr = \"127.0.0.1\"") }
end
end
# TODO (degorenko): switch to on_supported_os function when we got Xenial
context 'on Debian platforms with Ubuntu release 16' do
let :facts do
@default_facts.merge({
:osfamily => 'Debian',
:operatingsystem => 'Ubuntu',
:operatingsystemmajrelease => '16'
})
end
it_configures 'nova migration with libvirt'
it { is_expected.to contain_file_line('/etc/default/libvirtd libvirtd opts').with(:line => 'libvirtd_opts="-l"') }
end
context 'on Debian platforms release' do
let :facts do
@default_facts.merge({
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystemmajrelease => '8'
})
end
it_configures 'nova migration with libvirt'
it { is_expected.to contain_file_line('/etc/default/libvirtd libvirtd opts').with(:line => 'libvirtd_opts="-d -l"') }
end
context 'on RedHat platforms' do
let :facts do
@default_facts.merge({
:osfamily => 'RedHat',
:operatingsystem => 'CentOS',
:operatingsystemmajrelease => '7.0'
})
end
it_configures 'nova migration with libvirt'
it { is_expected.to contain_file_line('/etc/sysconfig/libvirtd libvirtd args').with(:line => 'LIBVIRTD_ARGS="--listen"') }
end
shared_examples_for 'ssh tunneling' do
context 'with ssh transport' do
let :params do
@ -277,4 +234,45 @@ describe 'nova::migration::libvirt' do
end
end
# TODO (degorenko): switch to on_supported_os function when we got Xenial
context 'on Debian platforms with Ubuntu release 16' do
let :facts do
@default_facts.merge({
:osfamily => 'Debian',
:operatingsystem => 'Ubuntu',
:operatingsystemmajrelease => '16'
})
end
it_configures 'nova migration with libvirt'
it { is_expected.to contain_file_line('/etc/default/libvirtd libvirtd opts').with(:line => 'libvirtd_opts="-l"') }
end
context 'on Debian platforms release' do
let :facts do
@default_facts.merge({
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystemmajrelease => '8'
})
end
it_configures 'nova migration with libvirt'
it { is_expected.to contain_file_line('/etc/default/libvirtd libvirtd opts').with(:line => 'libvirtd_opts="-d -l"') }
end
context 'on RedHat platforms' do
let :facts do
@default_facts.merge({
:osfamily => 'RedHat',
:operatingsystem => 'CentOS',
:operatingsystemmajrelease => '7.0'
})
end
it_configures 'nova migration with libvirt'
it { is_expected.to contain_file_line('/etc/sysconfig/libvirtd libvirtd args').with(:line => 'LIBVIRTD_ARGS="--listen"') }
end
end