Skip to content
Draft
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
30 changes: 30 additions & 0 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,34 @@ class {'jenkins':
it { is_expected.to contain ' <slaveAgentPort>7777</slaveAgentPort>' }
end
end

context 'proxy' do
include_examples 'an idempotent resource' do
let(:manifest) do
<<~PUPPET
class {'jenkins':
proxy_host => '192.0.2.1',
proxy_port => 1234,
no_proxy_list => ['*'],
}
PUPPET
end
end

describe port(8080) do
# jenkins should already have been running so we shouldn't have to
# sleep
it { is_expected.to be_listening }
end

describe service('jenkins') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end

describe file('/var/lib/jenkins/proxy.xml') do
it { is_expected.to contain '<name>192.0.2.1</name>' }
it { is_expected.to contain '<port>1234</port>' }
end
end
end