Documentation
¶
Overview ¶
Package agent contains a wrapper around the agent commands for use in tests.
Index ¶
- type Agent
- func (a *Agent) Configuration() (map[string]any, error)
- func (a *Agent) Install(options ...InstallOption) error
- func (a *Agent) MustInstall(options ...InstallOption)
- func (a *Agent) MustSetExperimentTimeout(timeout time.Duration)
- func (a *Agent) MustUninstall()
- func (a *Agent) MustUnsetExperimentTimeout()
- func (a *Agent) Uninstall() error
- type InstallOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is a cross platform wrapper around the agent commands for use in tests.
func New ¶
func New(t func() *testing.T, host *environments.Host) *Agent
New creates a new instance of Agent.
func (*Agent) Configuration ¶
Configuration returns the configuration of the agent.
func (*Agent) Install ¶
func (a *Agent) Install(options ...InstallOption) error
Install installs the agent.
func (*Agent) MustInstall ¶
func (a *Agent) MustInstall(options ...InstallOption)
MustInstall installs the agent and panics if it fails.
func (*Agent) MustSetExperimentTimeout ¶
MustSetExperimentTimeout sets the agent experiment timeout for config and upgrades.
func (*Agent) MustUninstall ¶
func (a *Agent) MustUninstall()
MustUninstall uninstalls the agent and panics if it fails.
func (*Agent) MustUnsetExperimentTimeout ¶
func (a *Agent) MustUnsetExperimentTimeout()
MustUnsetExperimentTimeout unsets the agent experiment timeout for config and upgrades.
type InstallOption ¶
type InstallOption func(*installParams)
InstallOption is an optional function parameter type for InstallParams options
func WithRemoteUpdates ¶
func WithRemoteUpdates() InstallOption
WithRemoteUpdates enables remote updates.
func WithStablePackages ¶
func WithStablePackages() InstallOption
WithStablePackages uses the stable packages.