@@ -216,10 +216,10 @@ def wait_on_puppetdb_status(seconds = 240)
216
216
# Puppetserver Helpers
217
217
######################################################################
218
218
219
- def wait_on_puppetserver_status ( seconds = 180 )
219
+ def wait_on_puppetserver_status ( seconds = 180 , service_name = 'puppet' )
220
220
# puppetserver has a healthcheck, we can let that deal with timeouts
221
221
return retry_block_up_to_timeout ( seconds ) do
222
- status = get_container_status ( get_service_container ( 'puppet' ) )
222
+ status = get_container_status ( get_service_container ( service_name ) )
223
223
( status == 'healthy' || status == "'healthy'" ) ? 'healthy' :
224
224
raise ( "puppetserver stuck in #{ status } " )
225
225
end
@@ -237,11 +237,11 @@ def clean_certificate(agent_name)
237
237
# Puppet Agent Helpers
238
238
######################################################################
239
239
240
- def run_agent ( agent_name , network , server = get_container_hostname ( get_service_container ( 'puppet' ) ) )
240
+ def run_agent ( agent_name , network , server = get_container_hostname ( get_service_container ( 'puppet' ) ) , ca = get_container_hostname ( get_service_container ( 'puppet' ) ) )
241
241
# setting up a Windows TTY is difficult, so we don't
242
242
# allocating a TTY will show container pull output on Linux, but that's not good for tests
243
243
STDOUT . puts ( "running agent #{ agent_name } in network #{ network } against #{ server } " )
244
- result = run_command ( "docker run --rm --network #{ network } --name #{ agent_name } --hostname #{ agent_name } puppet/puppet-agent-alpine agent --verbose --onetime --no-daemonize --summarize --server #{ server } " )
244
+ result = run_command ( "docker run --rm --network #{ network } --name #{ agent_name } --hostname #{ agent_name } puppet/puppet-agent-alpine agent --verbose --onetime --no-daemonize --summarize --server #{ server } --ca_server #{ ca } " )
245
245
return result [ :status ] . exitstatus
246
246
end
247
247
0 commit comments