Documentation ¶
Overview ¶
The CPUCmd plugin implements an CPU command executor step. Only PublicKey authentication is supported.
The cpu command uses ssh config files, e.g. ~/.ssh/config. The big difference is that cpu will default to port 23, not port 22, if no entries exist for a host.
Warning: this plugin does not lock keys in memory, and does no safe erase in memory to avoid forensic attacks. If you need that, please submit a PR.
Warning: commands are interpreted, so be careful with external input in the test step arguments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Events = []event.Name{}
Events is used by the framework to determine which events this plugin will emit. Any emitted event that is not registered here will cause the plugin to fail.
var Name = "CPUCmd"
Name is the name used to look this plugin up.
Functions ¶
Types ¶
type CPUCmd ¶
type CPUCmd struct { Host *test.Param Port *test.Param User *test.Param PrivateKeyFile *test.Param Executable *test.Param Args []test.Param Expect *test.Param Timeout *test.Param SkipIfEmptyHost *test.Param *cpu.Cmd }
CPUCmd is used to run arbitrary commands as test steps.
func (*CPUCmd) Run ¶
func (ts *CPUCmd) Run( ctx xcontext.Context, ch test.TestStepChannels, ev testevent.Emitter, stepsVars test.StepsVariables, params test.TestStepParameters, resumeState json.RawMessage, ) (json.RawMessage, error)
Run executes the cmd step.
func (*CPUCmd) ValidateParameters ¶
ValidateParameters validates the parameters associated to the TestStep