-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement acceptance tests for webhook-go
cherry-picked from https://github.com/voxpupuli/puppet-r10k/pull/607/files
- Loading branch information
1 parent
4eb3ca6
commit 942e5c8
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper_acceptance' | ||
|
||
describe 'r10k::webhook tests' do | ||
context 'when defaults used' do | ||
it 'applies' do | ||
pp = <<-MANIFEST | ||
class { 'r10k': } | ||
-> class { 'r10k::webhook': } | ||
MANIFEST | ||
|
||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
describe package('webhook-go') do | ||
it { is_expected.to be_installed } | ||
end | ||
|
||
describe file('/etc/voxpupuli/webhook.yml') do | ||
it 'exists and has content' do | ||
expect(subject).to exist | ||
expect(subject).to be_owned_by 'root' | ||
expect(subject).to be_grouped_into 'root' | ||
expect(subject).to contain "---\nserver:\n protected: true\n user: puppet\n password: puppet\n" | ||
end | ||
end | ||
|
||
describe service('webhook-go') do | ||
it { is_expected.to be_enabled } | ||
it { is_expected.to be_running } | ||
end | ||
end | ||
end |