Skip to content

Commit 1232c18

Browse files
committed
Configure a sample VirtualHost
Without VirtualHost, nginx will start on CentOS but will not listen on any port. Add a sample VirtualHost using the default parameters so that the test suite can ensure port 80 is accepting connexions.
1 parent b53f736 commit 1232c18

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

spec/acceptance/init_spec.rb

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
context 'default parameters' do
55
# Using puppet_apply as a helper
66
it 'works idempotently with no errors' do
7-
pp = 'include nginx'
7+
pp = "
8+
include nginx
9+
10+
nginx::resource::server { 'example.com':
11+
ensure => present,
12+
www_root => '/var/www/html',
13+
}
14+
"
815

916
# Run it twice and test for idempotency
1017
apply_manifest(pp, catch_failures: true)
@@ -35,7 +42,16 @@
3542
context 'with service_config_check true' do
3643
# Using puppet_apply as a helper
3744
it 'works idempotently with no errors' do
38-
pp = "class { 'nginx': service_config_check => true, }"
45+
pp = "
46+
class { 'nginx':
47+
service_config_check => true,
48+
}
49+
50+
nginx::resource::server { 'example.com':
51+
ensure => present,
52+
www_root => '/var/www/html',
53+
}
54+
"
3955

4056
# Run it twice and test for idempotency
4157
apply_manifest(pp, catch_failures: true)

0 commit comments

Comments
 (0)