Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ permissions:
jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v4
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v4
with:
beaker_hypervisor: 'vagrant_libvirt'
5 changes: 4 additions & 1 deletion .sync.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
.github/workflows/ci.yml:
acceptance_tests: false
with:
beaker_hypervisor: vagrant_libvirt
spec/spec_helper_acceptance.rb:
unmanaged: false
16 changes: 8 additions & 8 deletions spec/acceptance/01_virtualbox_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,33 @@
end

context "with version parameter to #{version}" do
let(:pp) do
<<-EOS
class { 'virtualbox':
version => '#{version}',
}
EOS
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-EOS
class { 'virtualbox':
version => '#{version}',
}
EOS
end
end

it_behaves_like 'an idempotent puppet code'

describe package(package_name) do
it { is_expected.to be_installed }

Check failure on line 49 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Debian 12

virtualbox class with version parameter to 5.0 Package "virtualbox-5.0" is expected to be installed Failure/Error: it { is_expected.to be_installed } expected Package "virtualbox-5.0" to be installed

Check failure on line 49 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Ubuntu 22.04

virtualbox class with version parameter to 5.0 Package "virtualbox-5.0" is expected to be installed Failure/Error: it { is_expected.to be_installed } expected Package "virtualbox-5.0" to be installed
end

describe command('VBoxManage --version') do
its(:exit_status) { is_expected.to eq 0 }

Check failure on line 53 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Debian 12

virtualbox class with version parameter to 5.0 Command "VBoxManage --version" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 127 (compared using ==)

Check failure on line 53 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Ubuntu 22.04

virtualbox class with version parameter to 5.0 Command "VBoxManage --version" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 127 (compared using ==)
its(:stdout) { is_expected.to match Regexp.new("^#{Regexp.escape(version)}") }

Check failure on line 54 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Debian 12

virtualbox class with version parameter to 5.0 Command "VBoxManage --version" stdout is expected to match /^5\.0/ Failure/Error: its(:stdout) { is_expected.to match Regexp.new("^#{Regexp.escape(version)}") } expected "" to match /^5\.0/ Diff: @@ -1 +1 @@ -/^5\.0/ +""

Check failure on line 54 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Ubuntu 22.04

virtualbox class with version parameter to 5.0 Command "VBoxManage --version" stdout is expected to match /^5\.0/ Failure/Error: its(:stdout) { is_expected.to match Regexp.new("^#{Regexp.escape(version)}") } expected "" to match /^5\.0/ Diff: @@ -1 +1 @@ -/^5\.0/ +""
end

describe command('/usr/lib/virtualbox/vboxdrv.sh status') do
its(:exit_status) { is_expected.to eq 0 }

Check failure on line 58 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Debian 12

virtualbox class with version parameter to 5.0 Command "/usr/lib/virtualbox/vboxdrv.sh status" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 127 (compared using ==)

Check failure on line 58 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Ubuntu 22.04

virtualbox class with version parameter to 5.0 Command "/usr/lib/virtualbox/vboxdrv.sh status" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 127 (compared using ==)
its(:stdout) { is_expected.to match %r{VirtualBox kernel modules \(.*\) are loaded\.} }

Check failure on line 59 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Debian 12

virtualbox class with version parameter to 5.0 Command "/usr/lib/virtualbox/vboxdrv.sh status" stdout is expected to match /VirtualBox kernel modules \(.*\) are loaded\./ Failure/Error: its(:stdout) { is_expected.to match %r{VirtualBox kernel modules \(.*\) are loaded\.} } expected "" to match /VirtualBox kernel modules \(.*\) are loaded\./ Diff: @@ -1 +1 @@ -/VirtualBox kernel modules \(.*\) are loaded\./ +""

Check failure on line 59 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Ubuntu 22.04

virtualbox class with version parameter to 5.0 Command "/usr/lib/virtualbox/vboxdrv.sh status" stdout is expected to match /VirtualBox kernel modules \(.*\) are loaded\./ Failure/Error: its(:stdout) { is_expected.to match %r{VirtualBox kernel modules \(.*\) are loaded\.} } expected "" to match /VirtualBox kernel modules \(.*\) are loaded\./ Diff: @@ -1 +1 @@ -/VirtualBox kernel modules \(.*\) are loaded\./ +""
end

describe command('modinfo vboxdrv') do
its(:exit_status) { is_expected.to eq 0 }

Check failure on line 63 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Debian 12

virtualbox class with version parameter to 5.0 Command "modinfo vboxdrv" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 1 (compared using ==)

Check failure on line 63 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Ubuntu 22.04

virtualbox class with version parameter to 5.0 Command "modinfo vboxdrv" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 1 (compared using ==)
its(:stdout) { is_expected.to match %r{version:.* #{Regexp.escape(version)}} }

Check failure on line 64 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Debian 12

virtualbox class with version parameter to 5.0 Command "modinfo vboxdrv" stdout is expected to match /version:.* 5\.0/ Failure/Error: its(:stdout) { is_expected.to match %r{version:.* #{Regexp.escape(version)}} } expected "" to match /version:.* 5\.0/ Diff: @@ -1 +1 @@ -/version:.* 5\.0/ +""

Check failure on line 64 in spec/acceptance/01_virtualbox_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - Ubuntu 22.04

virtualbox class with version parameter to 5.0 Command "modinfo vboxdrv" stdout is expected to match /version:.* 5\.0/ Failure/Error: its(:stdout) { is_expected.to match %r{version:.* #{Regexp.escape(version)}} } expected "" to match /version:.* 5\.0/ Diff: @@ -1 +1 @@ -/version:.* 5\.0/ +""
end
end
end
Expand Down
17 changes: 5 additions & 12 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# frozen_string_literal: true

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

configure_beaker do |host|
on host, puppet('module', 'install', 'puppet-archive')
end
require 'voxpupuli/acceptance/spec_helper_acceptance'

shared_examples 'an idempotent puppet code' do
it 'applies without error' do
apply_manifest(pp, catch_failures: true)
end
configure_beaker(modules: :metadata)

it 'applies idempotently' do
apply_manifest(pp, catch_changes: true)
end
end
Dir['./spec/support/acceptance/**/*.rb'].sort.each { |f| require f }
Loading