beaker: add some more basic tests

This commit is contained in:
Matthew Haughton 2015-04-09 10:44:07 -04:00 committed by Matthew Haughton
parent 69ccfae779
commit 78218ac8c7
3 changed files with 20 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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")