Skip to content

Instantly share code, notes, and snippets.

@lusis
Created September 28, 2016 18:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lusis/039b69909845e231268dc427a3209ecf to your computer and use it in GitHub Desktop.
this won't ever work
require 'spec_helper_acceptance'
describe 'nginx' do
context 'default' do
pp = <<-EOS
include stdlib
include nginx
EOS
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
describe package('nginx') do
it { should be_installed }
end
describe package('openresty') do
it { should_not be_installed }
end
describe service('nginx') do
it { should be_enabled }
it { should_not be_running }
end
end
context "openresty flavor" do
pp = <<-EOS
include stdlib
class {"nginx":
version => '1.11.2.1-6',
flavor => 'openresty',
}
include nginx
EOS
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
describe package('openresty') do
it { should be_installed }
end
describe package('nginx') do
it { should_not be_installed }
end
describe service('nginx') do
it { should be_enabled }
it { should_not be_running }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment