Browse Source

update tests

Lebedev Vadim 10 years ago
parent
commit
f4d543e0e9
3 changed files with 19 additions and 19 deletions
  1. 2 2
      tests/vhost.pp
  2. 0 17
      tests/vhost_ssl.erb
  3. 17 0
      tests/vhost_ssl.pp

+ 2 - 2
tests/vhost.pp

@@ -1,6 +1,6 @@
 include nginx
 
-nginx::resource::vhost { 'test.local':
+nginx::resource::vhost { 'test.local test':
   ensure       => present,
   ipv6_enable  => true,
   proxy        => 'http://proxypass',
@@ -9,7 +9,7 @@ nginx::resource::vhost { 'test.local':
 nginx::resource::vhost { 'test.local:8080':
   ensure       => present,
   listen_port  => 8080,
-  server_name  => 'test.local',
+  server_name  => ['test.local test'],
   ipv6_enable  => true,
   proxy        => 'http://proxypass',
 }

+ 0 - 17
tests/vhost_ssl.erb

@@ -1,17 +0,0 @@
-include nginx
-
-nginx::resource::vhost { 'test2.local':
-  ensure   => present,
-  www_root => '/var/www/nginx-default',
-  ssl      => 'true',
-  ssl_cert => '/tmp/server.crt',
-  ssl_key  => '/tmp/server.pem',
-}
-
-nginx::resource::location { 'test2.local-bob':
-  ensure   => present,
-  www_root => '/var/www/bob',
-  location => '/bob',
-  vhost    => 'test2.local',
-}
-

+ 17 - 0
tests/vhost_ssl.pp

@@ -0,0 +1,17 @@
+include nginx
+
+nginx::resource::vhost { 'test2.local test2':
+  ensure   => present,
+  www_root => '/var/www/nginx-default',
+  ssl      => true,
+  ssl_cert => 'puppet:///modules/sslkey/whildcard_mydomain.crt',
+  ssl_key  => 'puppet:///modules/sslkey/whildcard_mydomain.key' 
+}
+
+nginx::resource::location { 'test2.local-bob':
+  ensure   => present,
+  www_root => '/var/www/bob',
+  location => '/bob',
+  vhost    => 'test2.local test2',
+}
+