Skip to content

Commit 87be490

Browse files
igalicMorgan Haskel
authored andcommitted
add spec test for (default) docroot directory
, which is now a parameter to init.pp
1 parent 6330c89 commit 87be490

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/classes/apache_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
it { is_expected.to contain_user("www-data") }
2424
it { is_expected.to contain_group("www-data") }
2525
it { is_expected.to contain_class("apache::service") }
26+
it { is_expected.to contain_file("/var/www").with(
27+
'ensure' => 'directory',
28+
)
29+
}
2630
it { is_expected.to contain_file("/etc/apache2/sites-enabled").with(
2731
'ensure' => 'directory',
2832
'recurse' => 'true',
@@ -225,6 +229,10 @@
225229
it { is_expected.to contain_user("apache") }
226230
it { is_expected.to contain_group("apache") }
227231
it { is_expected.to contain_class("apache::service") }
232+
it { is_expected.to contain_file("/var/www/html").with(
233+
'ensure' => 'directory',
234+
)
235+
}
228236
it { is_expected.to contain_file("/etc/httpd/conf.d").with(
229237
'ensure' => 'directory',
230238
'recurse' => 'true',
@@ -498,6 +506,10 @@
498506
it { is_expected.to contain_user("www") }
499507
it { is_expected.to contain_group("www") }
500508
it { is_expected.to contain_class("apache::service") }
509+
it { is_expected.to contain_file("/usr/local/www/apache22/data").with(
510+
'ensure' => 'directory',
511+
)
512+
}
501513
it { is_expected.to contain_file("/usr/local/etc/apache22/Vhosts").with(
502514
'ensure' => 'directory',
503515
'recurse' => 'true',

0 commit comments

Comments
 (0)