Class: ScoutAgent::Assignment::Test
- Inherits:
-
ScoutAgent::Assignment
- Object
- ScoutAgent::Assignment
- ScoutAgent::Assignment::Test
- Defined in:
- lib/scout_agent/assignment/test.rb
Overview
Invoke with:
scout_agent test [once] path/to/plugin.rb [<<< '{"options": "in JSON"}']
This command is a test mode for plugin developers. It allows you to run a plugin and see what that code generates.
The only required argument is a path to the plugin you wish to test. That path can be a file path or a URL to load the code from.
By default, URL’s will just be run once and files will be run in a loop that watches the code for changes and reruns until you control-c the process. You can add the once parameter to have a file treated as a URL.
Default options will be read from a matching .yml file at the same path, if available. You can also provide option settings on $stdin
which will override the defaults.
If you need to test a plugin that expects queued messages, pass a "__queue__"
option that’s an Array of messages. They will be delivered to your plugin.
Instance Attribute Summary
Attributes inherited from ScoutAgent::Assignment
#group, #other_args, #switches, #user
Instance Method Summary collapse
-
#execute ⇒ Object
Runs the test command.
Methods inherited from ScoutAgent::Assignment
choose_group, choose_user, #initialize, plan, #prepare_and_execute
Methods included from Tracked
#clear_status, #force_status_database_reload, #status, #status_database, #status_log
Constructor Details
This class inherits a constructor from ScoutAgent::Assignment
Instance Method Details
#execute ⇒ Object
Runs the test command.
45 46 47 48 49 50 51 52 53 |
# File 'lib/scout_agent/assignment/test.rb', line 45 def execute install_interrupt_handler prepare_log prepare_mission load_code test_mission end |