The tester manage helpers are simple wrappers around the core management methods such
n2svcd.management_resource_drilldown. They provide some common pre/post-processing
to make the Lua test scripts simpler and more streamlined.
Tester REST management helper methods are accessed via the “n2.n2svcd.tester.manage” module:
local manage = require "n2.n2svcd.tester.manage"
resource_row_instance method uses the
n2svcd.management_resource_row method to request
the specific target application return of a single specific resource vector row where specifically:
- The row is a row from the application’s
- Additional post-processing of the
trace_logcolumn is performed to create a
The post-processing of the
trace_log involves finding all
trace_log entries, and extracting the text part of the line. These are placed in to
psuedo-column which can be checked for expected or unexpected warnings for the instance.
Only one single matching row is returned, rather than an array of rows.
The parameters for this method are:
[Required] The name of the application whose resource vector we are fetching.
This must be a real application name, it cannot be a virtual (load-share/failover) app name.
(Default = use the RestClientApp configured as "default_rest_app_name")
This is the automatically assigned 8-character hexadecimal string.
resource_row_instance method returns a Lua table object on success, or
nil if the
resource_row_instance did not match any of the resource rows.
instance = tester_api.rest_resource_row_instance ('Logic', edr_result.instance_idx) n2svcd.match_kpath_string (instance, 'completed', 'YES/Retain', true) n2svcd.match_kpath_string (instance, 'warnings.', nil, true)