Skip to content

Commit

Permalink
add acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
trefzer committed Aug 14, 2024
1 parent c648029 commit 5a5adb1
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions spec/acceptance/journal_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# frozen_string_literal: true

require 'spec_helper_acceptance'

describe 'systemd with remote/upload journal' do
machinectl = (fact('os.name') == 'Debian') && %w[11 12].include?(fact('os.release.major')) ? '/bin/machinectl' : '/usr/bin/machinectl'

context 'configure journal remote/upload' do
let(:manifest) do
<<~PUPPET
class { 'systemd':
manage_journal_upload => true,
manage_journal_remote => true,
journal_upload_settings => {
URL => 'http://127.0.0.1',
},
journal_remote_settings => {},
}
PUPPET
end

it 'works idempotently with no errors' do
apply_manifest(manifest, catch_failures: true)
apply_manifest(manifest, catch_changes: true)
end

describe file(machinectl) do
it { is_expected.to be_file }
end
end
end

0 comments on commit 5a5adb1

Please sign in to comment.