newe2e

package module
v0.52.1 Latest Latest
Warning

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

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

README

E2E Tests

This folder contains tests and utilities to write and run agent end to end tests based on Pulumi.

Documentation

See https://pkg.go.dev/github.com/DataDog/datadog-agent/test/new-e2e@main/pkg/utils/e2e.

Development in VSCode

This is a sub-module within datadog-agent. VSCode will complain about the multiple go.mod files. While waiting for a full repo migration to go workspaces, create a go workspace file and add test/new-e2e to workspaces

go work init
go work use . ./test/new-e2e

Use VsCode tasks to wrap aws-vault

The agent-sandbox: test current file can be used to launch test on a file withtout having to launch the whole VsCode wrapped by aws-vault exec. To use it copy the .template files in .vscode and remove the .template extension. You need to open the new-e2e folder

Note > go.work file is currently ignored in datadog-agent

Running new-e2e tests locally

/!\ When running your tests locally it will run tests with the latest stable version of the agent, not with the changes you have locally. Because running the test requires a complete build of the agent. As a workaround, you can run tests against the version of the agent built in an already run pipeline, to do it simply add the environment variable E2E_PIPELINE=<pipeline-id> to the command you use to run tests

Installer tests

Installer tests are tests owned by Agent Platform, that mostly test the installation of the agent on different platforms with different methods. These tests are defined in ./tests/agent-platform. The following are considered as installer tests:

  • ./tests/agent-platform/install-script: Test the installation of the agent using the install script
  • ./tests/agent-platform/step-by-step: Test the installation of the agent without the install script, following the manual installation described on the official documentation (for example)
  • ./tests/agent-platform/upgrade: Test the upgrade of the agent using the install script

All these tests can be executed locally with the following command: aws-vault exec sso-agent-sandbox-account-admin -- inv new-e2e-tests.run --targets <test folder path> --osversion '<comma separated os version list>' -platform '<debian/centos/suse/ubuntu>' --arch <x86_64/arm64>

The available os versions can be found in the file ./tests/agent-platform/platforms/platforms.json

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
components
Package components contains the definitions of the different components that can be used in a test.
Package components contains the definitions of the different components that can be used in a test.
e2e
Package e2e provides the API to manage environments and organize E2E tests.
Package e2e provides the API to manage environments and organize E2E tests.
environments
Package environments contains the definitions of the different environments that can be used in a test.
Package environments contains the definitions of the different environments that can be used in a test.
environments/aws/docker
Package awsdocker contains the definition of the AWS Docker environment.
Package awsdocker contains the definition of the AWS Docker environment.
environments/aws/host
Package awshost contains the definition of the AWS Host environment.
Package awshost contains the definition of the AWS Host environment.
runner
Package runner implements local and ci profile runners
Package runner implements local and ci profile runners
runner/parameters
Package parameters implements parameters for profiles
Package parameters implements parameters for profiles
utils/clients
Package clients implements utility clients
Package clients implements utility clients
utils/e2e/client
Package client contains the definitions of the different clients that can be used in a test.
Package client contains the definitions of the different clients that can be used in a test.
utils/e2e/client/agentclient
Package agentclient provides an interface to run Agent commands.
Package agentclient provides an interface to run Agent commands.
utils/e2e/client/agentclientparams
Package agentclientparams implements function parameters for [e2e.Agent]
Package agentclientparams implements function parameters for [e2e.Agent]
utils/infra
Package infra implements utilities to interact with a Pulumi infrastructure
Package infra implements utilities to interact with a Pulumi infrastructure
utils/optional
Package optional provides generic function to handle optional parameters.
Package optional provides generic function to handle optional parameters.
scenarios
system-probe
Package main is the entrypoint for the system-probe e2e testing scenario
Package main is the entrypoint for the system-probe e2e testing scenario
Package systemprobe is sets up the remote testing environment for system-probe using the Kernel Matrix Testing framework
Package systemprobe is sets up the remote testing environment for system-probe using the Kernel Matrix Testing framework
connector
Package main implements the SSH connector between gitlab runners, metal instances, and micro VMs
Package main implements the SSH connector between gitlab runners, metal instances, and micro VMs
connector/metric
Package metric is responsible for emitting metrics to Datadog
Package metric is responsible for emitting metrics to Datadog
connector/sshtools
Package sshtools allows execution of SSH commands easily
Package sshtools allows execution of SSH commands easily
test-json-review
Package main is the test-json-review tool which reports all failed tests from the test JSON output
Package main is the test-json-review tool which reports all failed tests from the test JSON output
test-runner
Package main is the test-runner tool which runs the system-probe tests
Package main is the test-runner tool which runs the system-probe tests
tests
agent-metric-logs/log-agent/utils
Package utils provides shared common functions so different E2E tests suites can use them.
Package utils provides shared common functions so different E2E tests suites can use them.
agent-platform/common
Package common contains basic test operation for agent-platform tests
Package common contains basic test operation for agent-platform tests
agent-platform/common/bound-port
Package boundport provides utilies for getting bound port information
Package boundport provides utilies for getting bound port information
agent-platform/common/file-manager
Package filemanager implement interfaces to run install-script tests
Package filemanager implement interfaces to run install-script tests
agent-platform/common/helper
Package helper implement interfaces to get some information that can be OS specific
Package helper implement interfaces to get some information that can be OS specific
agent-platform/common/pkg-manager
Package pkgmanager contains pkgmanager implementations
Package pkgmanager contains pkgmanager implementations
agent-platform/common/process
Package process provides utilities for testing processes
Package process provides utilities for testing processes
agent-platform/common/svc-manager
Package svcmanager contains svcmanager implementations
Package svcmanager contains svcmanager implementations
agent-platform/install
Package install create function to install the agent
Package install create function to install the agent
agent-platform/install/installparams
Package installparams implements function parameters for agent install functions
Package installparams implements function parameters for agent install functions
agent-platform/platforms
Package platforms exposes variable with content of platfoms.json file
Package platforms exposes variable with content of platfoms.json file
agent-subcommands/config
Package config contains helpers and e2e tests for config subcommand
Package config contains helpers and e2e tests for config subcommand
apm
Package apm for all apm new E2E tests
Package apm for all apm new E2E tests
containers
Package containers for all containers new E2E tests
Package containers for all containers new E2E tests
cws/api
Package api provides test helpers to interact with the Datadog API
Package api provides test helpers to interact with the Datadog API
npm
Package npm for all NPM new E2E tests
Package npm for all NPM new E2E tests
orchestrator
Package orchestrator holds all E2E tests for the various orchestrator checks
Package orchestrator holds all E2E tests for the various orchestrator checks
process
Package process contains end-to-end tests for the general functionality of the process agent.
Package process contains end-to-end tests for the general functionality of the process agent.
remote-config
Package remoteconfig contains tests for the remote config components of the agent
Package remoteconfig contains tests for the remote config components of the agent
windows
Package windows contains helpers for Windows E2E tests
Package windows contains helpers for Windows E2E tests
windows/agent
Package agent includes helpers related to the Datadog Agent on Windows
Package agent includes helpers related to the Datadog Agent on Windows
windows/agent/installers/v2
Package installers processes the installers_v2.json file
Package installers processes the installers_v2.json file

Jump to

Keyboard shortcuts

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