avocado_runner_docker package

Module contents

Run the job inside a docker container.

class avocado_runner_docker.DockerCLI

Bases: avocado.core.plugin_interfaces.CLI

Run the job inside a docker container


Configures the command line parser with options specific to this plugin

description = '*DEPRECATED* Run tests inside docker container'
name = 'docker'

Execute any action the plugin intends.

Example of action may include activating a special features upon finding that the requested command line options were set by the user.

Note: this plugin class is not intended for adding new commands, for that please use CLICmd.

class avocado_runner_docker.DockerRemoter(dkrcmd, image, options, name=None)

Bases: object

Remoter object similar to avocado_runner_remoter.RemoteTestRunner which implements subset of the commands on docker container.

Executes docker container and attaches it.

  • dkrcmd – The base docker binary (or command)
  • image – docker image to be used in this instance

Stop the container and remove it


Safely postprocess the container

Note:It won’t remove the container, you need to do it manually

Return this remoter’s container ID

receive_files(local_path, remote_path)

Receive files from the container

run(command, ignore_status=False, quiet=None, timeout=60)

Run command inside the container

class avocado_runner_docker.DockerTestRunner

Bases: avocado_runner_remote.RemoteTestRunner

Test runner which runs the job inside a docker container

description = '*DEPRECATED* Runs on a Docker (or compatible) container'
name = 'docker'

Setup remote environment


This method is only called when run_suite gets to the point of to be executing setup method and is called at the end of the execution.

Warning:It might be called on setup exceptions, so things initialized during setup might not yet be initialized.