-
Notifications
You must be signed in to change notification settings - Fork 32
Custom
Ondrej Lichtner edited this page Nov 4, 2016
·
1 revision
This test module can be used to report custom results (both PASS and FAIL), including result messages.
This test module accepts these options:
fail
|
accepts a boolean value specifying if the "test" should fail or not. The module PASSes by default, if the fail option is set to True it FAILs. |
custom single-value options | furthemore the module accepts any number of single-value options, that will be used as result data of the reported result. |
Add the following to your Python Task.
m1.sync_resources(["Custom"])
custom = ctl.get_module("Custom",
options={
"fail": True,
"example_option": "This is an example"})
m1.run(custom)
2016-11-04 10:47:48 (localhost) - INFO: Executing command: [type(test), module(Custom), host(1), netns(None)]
2016-11-04 10:47:48 (localhost) - INFO: Result: FAIL
2016-11-04 10:47:48 (localhost) - INFO: Result data:
2016-11-04 10:47:48 (localhost) - INFO: example_option: This is an example