Documentation
¶
Overview ¶
Package installer contains tests for the datadog installer
Package installer contains tests for the datadog installer
Index ¶
- Variables
- func GetAPIKey() string
- func InstallInstallerScriptEnvWithPackages() map[string]string
- func InstallScriptEnv(arch e2eos.Architecture) map[string]string
- func InstallScriptEnvWithPackages(arch e2eos.Architecture, packagesConfig []TestPackageConfig) map[string]string
- func PipelineAgentVersion(t *testing.T) string
- type InstallMethodOption
- type PackageOption
- type TestPackageConfig
Constants ¶
This section is empty.
Variables ¶
var PackagesConfig = []TestPackageConfig{ {Name: "datadog-installer", Version: fmt.Sprintf("pipeline-%v", os.Getenv("E2E_PIPELINE_ID")), Registry: "installtesting.datad0g.com.internal.dda-testing.com"}, {Name: "datadog-agent", Alias: "agent-package", Version: fmt.Sprintf("pipeline-%v", os.Getenv("E2E_PIPELINE_ID")), Registry: "installtesting.datad0g.com.internal.dda-testing.com"}, {Name: "datadog-ddot", Alias: "ddot-package", Version: fmt.Sprintf("pipeline-%v", os.Getenv("E2E_PIPELINE_ID")), Registry: "installtesting.datad0g.com.internal.dda-testing.com"}, {Name: "datadog-apm-inject", Version: "latest"}, {Name: "apm-inject-package", Version: "latest"}, {Name: "datadog-apm-library-java", Version: "latest"}, {Name: "datadog-apm-library-ruby", Version: "latest"}, {Name: "datadog-apm-library-js", Version: "latest"}, {Name: "datadog-apm-library-dotnet", Alias: "apm-library-dotnet-package", Version: "latest"}, {Name: "datadog-apm-library-python", Version: "latest"}, }
PackagesConfig is the list of known packages configuration for testing
Functions ¶
func GetAPIKey ¶ added in v0.73.0
func GetAPIKey() string
GetAPIKey returns the API key from the runner config, or a default value if not set
Set the key in ~/.test_infra_config.yaml or use the E2E_API_KEY env var
Do not use the DD_API_KEY env var, the CI uses it to report results to org2, the tests should use a different key.
func InstallInstallerScriptEnvWithPackages ¶ added in v0.66.0
InstallInstallerScriptEnvWithPackages returns the environment variables for the installer script for the given packages
func InstallScriptEnv ¶
func InstallScriptEnv(arch e2eos.Architecture) map[string]string
InstallScriptEnv returns the environment variables for the install script
func InstallScriptEnvWithPackages ¶
func InstallScriptEnvWithPackages(arch e2eos.Architecture, packagesConfig []TestPackageConfig) map[string]string
InstallScriptEnvWithPackages returns the environment variables for the install script for the given packages
func PipelineAgentVersion ¶ added in v0.72.0
PipelineAgentVersion returns the version of the pipeline agent
Types ¶
type InstallMethodOption ¶
type InstallMethodOption string
InstallMethodOption is the type for the install method to use for the tests
const ( // InstallMethodInstallScript is the default install method InstallMethodInstallScript InstallMethodOption = "install_script" // InstallMethodAnsible is the install method for Ansible InstallMethodAnsible InstallMethodOption = "ansible" // InstallMethodWindows is the install method for Windows InstallMethodWindows InstallMethodOption = "windows" )
func GetInstallMethodFromEnv ¶
func GetInstallMethodFromEnv(t *testing.T) InstallMethodOption
GetInstallMethodFromEnv returns the install method to use for the tests
type PackageOption ¶
type PackageOption func(*TestPackageConfig) error
PackageOption is an optional function parameter type for the Datadog Installer
func WithAlias ¶
func WithAlias(alias string) PackageOption
WithAlias specifies the package's alias.
func WithAuthentication ¶
func WithAuthentication(auth string) PackageOption
WithAuthentication uses a specific authentication for a Registry to install the package.
func WithRegistry ¶
func WithRegistry(registryURL string) PackageOption
WithRegistry uses a specific Registry from where to install the package.
func WithVersion ¶
func WithVersion(version string) PackageOption
WithVersion uses a specific version of the package.
type TestPackageConfig ¶
type TestPackageConfig struct {
// Name the name of the package
Name string
// Alias Sometimes the package is named differently in some registries
Alias string
// Version the version to install
Version string
// Registry the URL of the registry
Registry string
// Auth the authentication method, "" for no authentication
Auth string
}
TestPackageConfig is a struct that regroups the fields necessary to install a package from an OCI Registry