Skip to content

Commit

Permalink
Add basic acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed May 23, 2024
1 parent f3f543d commit 8b28cef
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ concurrency:
jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v2
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
2 changes: 2 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
spec/spec_helper_acceptance.rb:
unmanaged: false
.puppet-lint.rc:
enabled_lint_checks:
- parameter_documentation
Expand Down
26 changes: 26 additions & 0 deletions spec/acceptance/init_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# frozen_string_literal: true

require 'spec_helper_acceptance'

describe 'bolt' do
describe 'with defaults' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
include bolt
PUPPET
end
end
end

shell('yum clean all --verbose; rm -rf /etc/yum.repos.d/puppet-tools-release.repo; dnf erase --yes puppet-bolt puppet-tools-release')
describe 'with manually managed repo' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
class { 'bolt': use_release_package => false }
PUPPET
end
end
end
end
10 changes: 10 additions & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

require 'voxpupuli/acceptance/spec_helper_acceptance'

configure_beaker(modules: :metadata)

Dir['./spec/support/acceptance/**/*.rb'].sort.each { |f| require f }

0 comments on commit 8b28cef

Please sign in to comment.