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
|
describe service('nginx') do
|
||||||
it { is_expected.to be_running }
|
it { is_expected.to be_running }
|
||||||
|
it { is_expected.to be_enabled }
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,7 +12,10 @@ describe "nginx::resource::mailhost define:" do
|
||||||
auth_http => 'localhost/cgi-bin/auth',
|
auth_http => 'localhost/cgi-bin/auth',
|
||||||
protocol => 'smtp',
|
protocol => 'smtp',
|
||||||
listen_port => 587,
|
listen_port => 587,
|
||||||
|
ssl => true,
|
||||||
ssl_port => 465,
|
ssl_port => 465,
|
||||||
|
ssl_cert => '/tmp/blah.cert',
|
||||||
|
ssl_key => '/tmp/blah.key',
|
||||||
xclient => 'off',
|
xclient => 'off',
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
@ -25,4 +28,12 @@ describe "nginx::resource::mailhost define:" do
|
||||||
it { is_expected.to contain "auth_http localhost/cgi-bin/auth;" }
|
it { is_expected.to contain "auth_http localhost/cgi-bin/auth;" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe port(587) do
|
||||||
|
it { is_expected.to be_listening }
|
||||||
|
end
|
||||||
|
|
||||||
|
describe port(465) do
|
||||||
|
it { is_expected.to be_listening }
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,6 +31,10 @@ describe "nginx::resource::vhost define:" do
|
||||||
it { is_expected.to be_running }
|
it { is_expected.to be_running }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe port(80) do
|
||||||
|
it { is_expected.to be_listening }
|
||||||
|
end
|
||||||
|
|
||||||
it 'should answer to www.puppetlabs.com' do
|
it 'should answer to www.puppetlabs.com' do
|
||||||
shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r|
|
shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r|
|
||||||
expect(r.stdout).to eq("Hello from www\n")
|
expect(r.stdout).to eq("Hello from www\n")
|
||||||
|
@ -72,6 +76,10 @@ describe "nginx::resource::vhost define:" do
|
||||||
it { is_expected.to be_running }
|
it { is_expected.to be_running }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe port(443) do
|
||||||
|
it { is_expected.to be_listening }
|
||||||
|
end
|
||||||
|
|
||||||
it 'should answer to http://www.puppetlabs.com' do
|
it 'should answer to http://www.puppetlabs.com' do
|
||||||
shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r|
|
shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r|
|
||||||
expect(r.stdout).to eq("Hello from www\n")
|
expect(r.stdout).to eq("Hello from www\n")
|
||||||
|
|
Loading…
Reference in a new issue