pxe: Validate apache resources

This change adds unit test cases to ensure the apache resources are
defined as expected.

Change-Id: I46e0423aaa0d137e5d33fcaa9f12f9bddda5dac8
This commit is contained in:
Takashi Kajinami 2022-09-06 21:09:58 +09:00
parent 4761d637b0
commit a1dc86bd3e
1 changed files with 20 additions and 0 deletions

View File

@ -113,6 +113,16 @@ describe 'ironic::pxe' do
)
end
it 'should configure http server' do
is_expected.to contain_class('apache')
is_expected.to contain_apache__vhost('ipxe_vhost').with(
:priority => 10,
:options => ['Indexes','FollowSymLinks'],
:docroot => '/httpboot',
:port => 8088
)
end
context 'when overriding parameters' do
before :each do
params.merge!(
@ -188,6 +198,16 @@ describe 'ironic::pxe' do
'backup' => false,
)
end
it 'should configure http server' do
is_expected.to contain_class('apache')
is_expected.to contain_apache__vhost('ipxe_vhost').with(
:priority => 10,
:options => ['Indexes','FollowSymLinks'],
:docroot => '/var/www/httpboot',
:port => 3816,
)
end
end
context 'when excluding syslinux' do