avocado_golang package¶
Module contents¶
Plugin to run Golang tests in Avocado
-
class
avocado_golang.
GolangCLI
¶ Bases:
avocado.core.plugin_interfaces.CLI
Run Golang tests
-
configure
(parser)¶ Configures the command line parser with options specific to this plugin
-
description
= "Golang options for 'run' subcommand"¶
-
name
= 'golang'¶
-
run
(config)¶ 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_golang.
GolangLoader
(args, extra_params)¶ Bases:
avocado.core.loader.TestLoader
Golang loader class
-
discover
(reference, which_tests=<DiscoverMode.DEFAULT: <object object>>)¶ Discover (possible) tests from an reference.
Parameters: - reference (str) – the reference to be inspected.
- which_tests (
DiscoverMode
) – Limit tests to be displayed
Returns: a list of test matching the reference as params.
-
static
get_decorator_mapping
()¶ Get label mapping for display in test listing.
Returns: Dict {TestClass: decorator function}
-
static
get_type_label_mapping
()¶ Get label mapping for display in test listing.
Returns: Dict {TestClass: ‘TEST_LABEL_STRING’}
-
name
= 'golang'¶
-
-
class
avocado_golang.
GolangTest
(name, params=None, base_logdir=None, job=None, subtest=None, executable=None)¶ Bases:
avocado.core.test.SimpleTest
Run a Golang Test command as a SIMPLE test.
-
filename
¶ Returns the path of the golang test suite.
-
test
()¶ Create the Golang command and execute it.
-