beaker test workflow

asked 2016-12-11 09:24:50 -0600

Beazer gravatar image


I've been watching a tutorial on beaker and the suggested workflow was to run beaker with provisioning and no destroy. Then run it with no provisioning against the container left running; I'm using docker for my VM.

I find that if I then run with no provisioning and no destroy, as suggested, then I hit an error in docker.rb on line 95, that prints the message:

if container.nil?
  raise RuntimeError, 'Cannot continue because no existing container ' +
                      'could be found and provisioning is disabled.'

I'm a bit puzzled as to how this code is supposed to work as it is currently failing to find the existing running docker container in this method:

# return the existing container if we're not provisioning
# and docker_container_name is set
def find_container(host)
  return nil if host['docker_container_name'].nil? || @options[:provision]
  @logger.debug("Looking for an existing container called #{host['docker_container_name']}") do |c|['Names'].include? "/#{host['docker_container_name']}"

Particularly on the line:

return nil if host['docker_container_name'].nil? || @options[:provision]

because the host hash has no such member as


image description

Am I misreading this or failing to understand the intended workflow?

Any help appreciated


edit retag flag offensive close merge delete