Skip to content

Commit

Permalink
Merge pull request #1250 from sensu/fix-acceptance
Browse files Browse the repository at this point in the history
Fix acceptance tests
  • Loading branch information
ghoneycutt authored May 7, 2020
2 parents 07c619c + 25a1d1d commit 2598f00
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 29 deletions.
5 changes: 0 additions & 5 deletions spec/acceptance/06_postgresql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

describe 'postgresql datastore', if: RSpec.configuration.sensu_mode == 'full' do
node = hosts_as('sensu-backend')[0]
before do
if ! RSpec.configuration.sensu_test_enterprise
skip("Skipping postgresql tests")
end
end
context 'adds postgresql datastore' do
it 'should work without errors and be idempotent' do
pp = <<-EOS
Expand Down
6 changes: 3 additions & 3 deletions spec/acceptance/99_facts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

it "should have backend facts" do
version = on(backend, 'facter -p sensu_backend.version').stdout
expect(version).to match(/^[0-9\.]+$/)
expect(version).to match(/^[0-9\.]+/)
end

it "should have sensuctl facts" do
version = on(backend, 'facter -p sensuctl.version').stdout
expect(version).to match(/^[0-9\.]+$/)
expect(version).to match(/^[0-9\.]+/)
end
end

Expand All @@ -54,7 +54,7 @@

it "should have agent facts" do
version = on(agent, 'facter -p sensu_agent.version').stdout
expect(version).to match(/^[0-9\.]+$/)
expect(version).to match(/^[0-9\.]+/)
end
end
end
5 changes: 0 additions & 5 deletions spec/acceptance/sensu_ad_auth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

describe 'sensu_ad_auth', if: RSpec.configuration.sensu_mode == 'types' do
node = hosts_as('sensu-backend')[0]
before do
if ! RSpec.configuration.sensu_test_enterprise
skip("Skipping enterprise tests")
end
end
context 'default' do
it 'should work without errors' do
pp = <<-EOS
Expand Down
5 changes: 0 additions & 5 deletions spec/acceptance/sensu_ldap_auth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

describe 'sensu_ldap_auth', if: RSpec.configuration.sensu_mode == 'types' do
node = hosts_as('sensu-backend')[0]
before do
if ! RSpec.configuration.sensu_test_enterprise
skip("Skipping enterprise tests")
end
end
context 'default' do
it 'should work without errors' do
pp = <<-EOS
Expand Down
5 changes: 0 additions & 5 deletions spec/acceptance/sensu_oidc_auth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

describe 'sensu_oidc_auth', if: RSpec.configuration.sensu_mode == 'types' do
node = hosts_as('sensu-backend')[0]
before do
if ! RSpec.configuration.sensu_test_enterprise
skip("Skipping enterprise tests")
end
end
context 'default' do
it 'should work without errors' do
pp = <<-EOS
Expand Down
5 changes: 0 additions & 5 deletions spec/acceptance/sensu_secrets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

describe 'sensu_secrets_vault_provider', if: RSpec.configuration.sensu_mode == 'types' do
node = hosts_as('sensu-backend')[0]
before do
if ! RSpec.configuration.sensu_test_enterprise
skip("Skipping enterprise tests")
end
end
context 'default' do
it 'should work without errors' do
pp = <<-EOS
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
if collection == 'puppet6'
on setup_nodes, puppet('module', 'install', 'puppetlabs-yumrepo_core', '--version', '">= 1.0.1 < 2.0.0"'), { :acceptable_exit_codes => [0,1] }
end
if RSpec.configuration.sensu_test_enterprise
if ['full','examples'].include?(RSpec.configuration.sensu_mode)
on setup_nodes, puppet('module', 'install', 'puppetlabs-postgresql', '--version', '">= 6.0.0 < 7.0.0"'), { :acceptable_exit_codes => [0,1] }
end
# Dependencies only needed to test some examples
Expand Down

0 comments on commit 2598f00

Please sign in to comment.