cpucmd

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 16 Imported by: 0

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

View Source
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.

View Source
var Name = "CPUCmd"

Name is the name used to look this plugin up.

Functions

func Load

func Load() (string, test.TestStepFactory, []event.Name)

Load returns the name, factory and events which are needed to register the step.

func New

func New() test.TestStep

New initializes and returns a new CPUCmd test step.

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) Name

func (ts CPUCmd) Name() string

Name returns the plugin name.

func (*CPUCmd) Run

Run executes the cmd step.

func (*CPUCmd) ValidateParameters

func (ts *CPUCmd) ValidateParameters(ctx xcontext.Context, params test.TestStepParameters) error

ValidateParameters validates the parameters associated to the TestStep

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL