From a1dc86bd3ee0a397738406cc1f9ac59120f35f8e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 6 Sep 2022 21:09:58 +0900 Subject: [PATCH] pxe: Validate apache resources This change adds unit test cases to ensure the apache resources are defined as expected. Change-Id: I46e0423aaa0d137e5d33fcaa9f12f9bddda5dac8 --- spec/classes/ironic_pxe_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spec/classes/ironic_pxe_spec.rb b/spec/classes/ironic_pxe_spec.rb index c640a8aa..ad172d4f 100644 --- a/spec/classes/ironic_pxe_spec.rb +++ b/spec/classes/ironic_pxe_spec.rb @@ -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