installtest

package
v0.53.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertAgentUserGroupMembership added in v0.53.0

func AssertAgentUserGroupMembership(t *testing.T, host *components.RemoteHost, username string) bool

AssertAgentUserGroupMembership checks the agent user is a member of the expected groups

func AssertDoesNotRemoveSystemFiles added in v0.53.0

func AssertDoesNotRemoveSystemFiles(t *testing.T, host *components.RemoteHost, beforeInstall *windowsCommon.FileSystemSnapshot)

AssertDoesNotRemoveSystemFiles checks that the paths in the snapshot still exist

func AssertGroupMembership added in v0.53.0

func AssertGroupMembership(t *testing.T, host *components.RemoteHost, user string, expectedGroups []string) bool

AssertGroupMembership asserts that the user is a member of the expected groups

func AssertInstalledUserInRegistry added in v0.53.0

func AssertInstalledUserInRegistry(t *testing.T, host *components.RemoteHost, expecteddomain string, expectedusername string) bool

AssertInstalledUserInRegistry checks the registry for the installed user and domain

func AssertUserRights added in v0.53.0

func AssertUserRights(t *testing.T, host *components.RemoteHost, username string) bool

AssertUserRights checks the user has the expected user rights

func ExpectPython2Installed added in v0.53.0

func ExpectPython2Installed(majorVersion string) bool

ExpectPython2Installed returns true if the provided agent major version is expected to contain an embedded Python2.

func RequireAgentRunningWithNoErrors added in v0.53.0

func RequireAgentRunningWithNoErrors(t *testing.T, client *common.TestClient)

RequireAgentRunningWithNoErrors checks the agent is running with no errors

func SystemPaths added in v0.53.0

func SystemPaths() []string

SystemPaths returns a list of paths that are known to frequently change and should be ignored when collecting the list of files

Types

type Tester

type Tester struct {
	InstallTestClient *common.TestClient
	// contains filtered or unexported fields
}

Tester is a test helper for testing agent installations

func NewTester

func NewTester(tt *testing.T, host *components.RemoteHost, opts ...TesterOption) (*Tester, error)

NewTester creates a new Tester

func (*Tester) ExpectAPM

func (t *Tester) ExpectAPM() bool

ExpectAPM returns true if the agent is expected to install APM

func (*Tester) ExpectCWS

func (t *Tester) ExpectCWS() bool

ExpectCWS returns true if the agent is expected to install CWS

func (*Tester) ExpectPython2Installed

func (t *Tester) ExpectPython2Installed() bool

ExpectPython2Installed returns true if the agent is expected to install Python2

func (*Tester) TestInstallExpectations added in v0.53.0

func (t *Tester) TestInstallExpectations(tt *testing.T) bool

TestInstallExpectations tests the current agent installation meets the expectations provided to the Tester

func (*Tester) TestUninstallExpectations added in v0.53.0

func (t *Tester) TestUninstallExpectations(tt *testing.T)

TestUninstallExpectations verifies the agent uninstalled correctly.

type TesterOption

type TesterOption func(*Tester)

TesterOption is a function that can be used to configure a Tester

func WithAgentPackage

func WithAgentPackage(agentPackage *windowsAgent.Package) TesterOption

WithAgentPackage sets the agent package to be installed

func WithExpectedAgentUser added in v0.53.0

func WithExpectedAgentUser(domain string, user string) TesterOption

WithExpectedAgentUser sets the expected user the agent should run as

func WithPreviousVersion

func WithPreviousVersion() TesterOption

WithPreviousVersion sets the Tester to expect a previous version of the agent to be installed and will not run all tests since expectations may have changed.

Directories

Path Synopsis
Package servicetest provides tests for the services installed by the Windows Agent
Package servicetest provides tests for the services installed by the Windows Agent

Jump to

Keyboard shortcuts

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