Skip to content

Commit

Permalink
Skip acceptance tests on Puppet 6 / Debian 11
Browse files Browse the repository at this point in the history
No puppetserver6 / puppetdb6 packages are available for Debian 11.
  • Loading branch information
smortex committed Mar 28, 2022
1 parent 56cd9ac commit c1da63a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

require 'spec_helper_acceptance'

describe 'puppetboard class' do
require_relative 'support/puppetdb'

describe 'puppetboard class', if: has_puppetdb do
case fact('os.family')
when 'RedHat'
apache_conf_file = '/etc/httpd/conf.d/25-puppetboard.conf'
Expand Down
10 changes: 10 additions & 0 deletions spec/acceptance/support/puppetdb.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

def has_puppetdb
case host_inventory['facter']['os']['name']
when 'Debian'
return false if ENV['BEAKER_PUPPET_COLLECTION'] == 'puppet6' && host_inventory['facter']['os']['release']['major'] == '11'
end

true
end

0 comments on commit c1da63a

Please sign in to comment.