diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index e0a9882..f35d5c8 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -18,6 +18,7 @@ describe "nginx class:" do describe service('nginx') do it { is_expected.to be_running } + it { is_expected.to be_enabled } end end diff --git a/spec/acceptance/nginx_mail_spec.rb b/spec/acceptance/nginx_mail_spec.rb index fb3c37a..df4c342 100644 --- a/spec/acceptance/nginx_mail_spec.rb +++ b/spec/acceptance/nginx_mail_spec.rb @@ -12,7 +12,10 @@ describe "nginx::resource::mailhost define:" do auth_http => 'localhost/cgi-bin/auth', protocol => 'smtp', listen_port => 587, + ssl => true, ssl_port => 465, + ssl_cert => '/tmp/blah.cert', + ssl_key => '/tmp/blah.key', xclient => 'off', } " @@ -25,4 +28,12 @@ describe "nginx::resource::mailhost define:" do it { is_expected.to contain "auth_http localhost/cgi-bin/auth;" } end + describe port(587) do + it { is_expected.to be_listening } + end + + describe port(465) do + it { is_expected.to be_listening } + end + end diff --git a/spec/acceptance/nginx_vhost_spec.rb b/spec/acceptance/nginx_vhost_spec.rb index 8224372..287621d 100644 --- a/spec/acceptance/nginx_vhost_spec.rb +++ b/spec/acceptance/nginx_vhost_spec.rb @@ -30,6 +30,10 @@ describe "nginx::resource::vhost define:" do describe service('nginx') do it { is_expected.to be_running } end + + describe port(80) do + it { is_expected.to be_listening } + end it 'should answer to www.puppetlabs.com' do shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r| @@ -72,6 +76,10 @@ describe "nginx::resource::vhost define:" do it { is_expected.to be_running } end + describe port(443) do + it { is_expected.to be_listening } + end + it 'should answer to http://www.puppetlabs.com' do shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r| expect(r.stdout).to eq("Hello from www\n")