Documentation ¶
Overview ¶
Package installtest contains e2e tests for the Windows agent installer
Index ¶
- func AssertAgentUserGroupMembership(t *testing.T, host *components.RemoteHost, username string) bool
- func AssertDoesNotRemoveSystemFiles(t *testing.T, host *components.RemoteHost, ...)
- func AssertGroupMembership(t *testing.T, host *components.RemoteHost, user string, ...) bool
- func AssertInstalledUserInRegistry(t *testing.T, host *components.RemoteHost, expecteddomain string, ...) bool
- func AssertUserRights(t *testing.T, host *components.RemoteHost, username string) bool
- func ExpectPython2Installed(majorVersion string) bool
- func RequireAgentRunningWithNoErrors(t *testing.T, client *common.TestClient)
- func SystemPaths() []string
- type Tester
- type TesterOption
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
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(context e2e.Context, host *components.RemoteHost, opts ...TesterOption) (*Tester, error)
NewTester creates a new Tester
func (*Tester) ExpectPython2Installed ¶
ExpectPython2Installed returns true if the agent is expected to install Python2
func (*Tester) TestInstallExpectations ¶ added in v0.53.0
TestInstallExpectations tests the current agent installation meets the expectations provided to the Tester
func (*Tester) TestUninstallExpectations ¶ added in v0.53.0
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 WithExpectedConfigRoot ¶ added in v0.54.0
func WithExpectedConfigRoot(path string) TesterOption
WithExpectedConfigRoot sets the expected config root for the agent
func WithExpectedInstallPath ¶ added in v0.54.0
func WithExpectedInstallPath(path string) TesterOption
WithExpectedInstallPath sets the expected install path for the agent
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 |