Documentation ¶
Overview ¶
Package windows contains the code to run the e2e tests on Windows
Package windows contains helpers for Windows E2E tests
Index ¶
- func CreateIISSite(host *components.RemoteHost, site []IISSiteDefinition) error
- func InstallIIS(host *components.RemoteHost) error
- type BaseAgentInstallerSuite
- func (b *BaseAgentInstallerSuite[Env]) BeforeTest(suiteName, testName string)
- func (b *BaseAgentInstallerSuite[Env]) InstallAgent(host *components.RemoteHost, options ...windowsAgent.InstallAgentOption) (string, error)
- func (b *BaseAgentInstallerSuite[Env]) NewTestClientForHost(host *components.RemoteHost) *platformCommon.TestClient
- func (b *BaseAgentInstallerSuite[Env]) SetupSuite()
- type IISSiteDefinition
- type RemoteExecutable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIISSite ¶ added in v0.56.0
func CreateIISSite(host *components.RemoteHost, site []IISSiteDefinition) error
CreateIISSite creates an IIS site on the target machine
func InstallIIS ¶ added in v0.56.0
func InstallIIS(host *components.RemoteHost) error
InstallIIS installs IIS on the target machine
Types ¶
type BaseAgentInstallerSuite ¶ added in v0.53.0
type BaseAgentInstallerSuite[Env any] struct { e2e.BaseSuite[Env] AgentPackage *windowsAgent.Package OutputDir string }
BaseAgentInstallerSuite is a base class for the Windows Agent installer suites
func (*BaseAgentInstallerSuite[Env]) BeforeTest ¶ added in v0.53.0
func (b *BaseAgentInstallerSuite[Env]) BeforeTest(suiteName, testName string)
BeforeTest overrides the base BeforeTest to perform some additional per-test setup like configuring the output directory.
func (*BaseAgentInstallerSuite[Env]) InstallAgent ¶ added in v0.53.0
func (b *BaseAgentInstallerSuite[Env]) InstallAgent(host *components.RemoteHost, options ...windowsAgent.InstallAgentOption) (string, error)
InstallAgent installs the Agent on a given Windows host. It will pass all the parameters to the MSI installer.
func (*BaseAgentInstallerSuite[Env]) NewTestClientForHost ¶ added in v0.53.0
func (b *BaseAgentInstallerSuite[Env]) NewTestClientForHost(host *components.RemoteHost) *platformCommon.TestClient
NewTestClientForHost creates a new TestClient for a given host.
func (*BaseAgentInstallerSuite[Env]) SetupSuite ¶ added in v0.53.0
func (b *BaseAgentInstallerSuite[Env]) SetupSuite()
SetupSuite overrides the base SetupSuite to perform some additional setups like setting the package to install.
type IISSiteDefinition ¶ added in v0.56.0
type IISSiteDefinition struct { Name string // name of the site BindingPort string // port to bind to, of the form '*:8081' AssetsDir string // directory to copy for assets }
IISSiteDefinition represents an IIS site definition
type RemoteExecutable ¶ added in v0.56.0
type RemoteExecutable struct {
// contains filtered or unexported fields
}
RemoteExecutable is a helper struct to run tests on a remote host
func NewRemoteExecutable ¶ added in v0.56.0
func NewRemoteExecutable(vm *components.RemoteHost, t *testing.T, filespec string, basepath string) *RemoteExecutable
NewRemoteExecutable creates a new RemoteExecutable
func (*RemoteExecutable) CopyFiles ¶ added in v0.56.0
func (rs *RemoteExecutable) CopyFiles() error
CopyFiles copies the test programs to the remote host.
CopyFiles also assumes that if there's a "testdata" directory in the same directory as the test program, that that should be copied too.
func (*RemoteExecutable) CreateRemotePaths ¶ added in v0.56.0
func (rs *RemoteExecutable) CreateRemotePaths() error
CreateRemotePaths creates the remote paths for the test programs
Takes the path to the test programs, and creates an identical directory tree on the remote host.
func (*RemoteExecutable) FindTestPrograms ¶ added in v0.56.0
func (rs *RemoteExecutable) FindTestPrograms() error
FindTestPrograms finds the locally available test programs.
it walks the root directory (provided at initialization), looking for any file that matches the provided filespec (usually `testsuite.exe`). If it finds that, it stores the full path for future copying.
func (*RemoteExecutable) RunTests ¶ added in v0.56.0
func (rs *RemoteExecutable) RunTests() error
RunTests iterates through all of the tests that were copied and executes them one by one. it captures the output, and logs it.
Directories ¶
Path | Synopsis |
---|---|
Package command provides Windows command helpers
|
Package command provides Windows command helpers |
Package common contains helpers for Windows E2E tests
|
Package common contains helpers for Windows E2E tests |
agent
Package agent includes helpers related to the Datadog Agent on Windows
|
Package agent includes helpers related to the Datadog Agent on Windows |
agent/installers/v2
Package installers processes the installers_v2.json file
|
Package installers processes the installers_v2.json file |
powershell
Package powershell provides
|
Package powershell provides |
components
|
|
defender
Package defender contains code to control the behavior of Windows defender in the E2E tests
|
Package defender contains code to control the behavior of Windows defender in the E2E tests |
Package installtest contains e2e tests for the Windows agent installer
|
Package installtest contains e2e tests for the Windows agent installer |
service-test
Package servicetest provides tests for the services installed by the Windows Agent
|
Package servicetest provides tests for the services installed by the Windows Agent |