beaker: add some more basic tests
This commit is contained in:
parent
69ccfae779
commit
78218ac8c7
3 changed files with 20 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue