installer

package
v0.69.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package installer contains code for the E2E tests for the Datadog installer/Fleet Automation/Remote Upgrades on Windows.

This package provides utilities and test suites to validate the installation, uninstallation, and upgrade processes of the Datadog Agent and related components on Windows systems.

Running Tests with Pipeline Artifacts

To run the tests using artifacts from a specific pipeline, set the following environment variables:

E2E_PIPELINE_ID=<pipeline_id>
CURRENT_AGENT_VERSION=<agent_version>
STABLE_AGENT_VERSION=<stable_agent_version>

Example:

E2E_PIPELINE_ID="40537701"
CURRENT_AGENT_VERSION="7.66.0-devel"
CURRENT_AGENT_VERSION_PACKAGE="7.66.0-devel.git.53.db3f37e.pipeline.1234-1"
STABLE_AGENT_VERSION="7.65.0"
STABLE_AGENT_VERSION_PACKAGE="7.65.0-1"

VERSION is used for comparing with the output of the `version` subcommand.

VERSION_PACKAGE is used for comparing with the Fleet package stable/experiment status

This assertion is currently a "contains" check, so the package version can be shortened to 7.66.0-devel for convenience. With local testing the _VERSION_PACKAGE variables can be omitted, though they are required in the CI.

Running Tests with Local Artifacts

To run the tests using local artifacts, set one or more the following environment variables:

CURRENT_AGENT_MSI_URL="file:///path/to/agent.msi"
STABLE_AGENT_OCI_URL="file:///path/to/oci/package.tar"

See `WithDevEnvOverrides()` here for more OCI options and and in `common/agent/` for more MSI options.

Contents Overview

Files Overview:

  • install_script.go: Contains the `DatadogInstallScript` struct and methods to run the Datadog Install script on a remote Windows host.
  • installer.go: Contains the `DatadogInstaller` struct and methods to manage the Datadog Installer executable on a remote Windows host, including installation, uninstallation, and package management.

Test Suites Overview:

@team/windows-agent

  • suites/installer-package: (deprecated) Old test suite for the Installer MSI. Contents should be eventually be moved to the Agent MSI tests.
  • suites/agent-package Tests remote upgrade and MSI operations of the Datadog Agent package using the Datadog installer.

APM and @team/windows-agent

  • suites/apm-library-dotnet-package: Tests the .NET APM Library for IIS package through remote upgrades and the Agent MSI

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentVersionManager added in v0.66.0

type AgentVersionManager struct {
	// contains filtered or unexported fields
}

AgentVersionManager provides Agent package information for a particular Agent version for the installer tests

func NewAgentVersionManager added in v0.66.0

func NewAgentVersionManager(versionStr, packageVersionStr string, ociPackage TestPackageConfig, msiPackage *windowsagent.Package) (*AgentVersionManager, error)

NewAgentVersionManager creates a new AgentVersionManager

func (*AgentVersionManager) MSIPackage added in v0.66.0

func (avm *AgentVersionManager) MSIPackage() *windowsagent.Package

MSIPackage returns the MSI package configuration

func (*AgentVersionManager) OCIPackage added in v0.66.0

func (avm *AgentVersionManager) OCIPackage() TestPackageConfig

OCIPackage returns the OCI package configuration

func (*AgentVersionManager) PackageVersion added in v0.66.0

func (avm *AgentVersionManager) PackageVersion() string

PackageVersion returns the Agent package version, e.g. 7.60.0-1

this should match the Agent's version.AgentPackageVersion field

Pipeline build example: 7.64.0-devel.git.1220.aaf8a1c.pipeline.58948204-1

func (*AgentVersionManager) String added in v0.66.0

func (avm *AgentVersionManager) String() string

String returns the string representation of the AgentVersionManager

func (*AgentVersionManager) Version added in v0.66.0

func (avm *AgentVersionManager) Version() string

Version returns the Agent version as returned by the version command, e.g. 7.60.0

this should match Agent's `version` subcommand output field

Pipeline build example: 7.64.0-devel

type BaseSuite added in v0.64.0

type BaseSuite struct {
	e2e.BaseSuite[environments.WindowsHost]

	CreateCurrentAgent func() (*AgentVersionManager, error)
	CreateStableAgent  func() (*AgentVersionManager, error)
	// contains filtered or unexported fields
}

BaseSuite the base suite for all installer tests on Windows (install script, MSI, exe etc...). To run the test suites locally, pick a pipeline and define the following environment variables: E2E_PIPELINE_ID: the ID of the pipeline CURRENT_AGENT_VERSION: pull it from one of the jobs that builds the Agent STABLE_AGENT_VERSION_PACKAGE: use `crane ls public.ecr.aws/datadog/agent-package | sort | tail -n 2 | head -n 1` or pick any other version from that registry.

For example:

CI_COMMIT_SHA=ac2acaffab7b039f8c2524df8ae82f9f5fd04d5d;
E2E_PIPELINE_ID=40537701;
CURRENT_AGENT_VERSION=7.57.0-devel+git.370.d429ae3;
STABLE_AGENT_VERSION_PACKAGE=7.55.2-1

func (*BaseSuite) AssertSuccessfulAgentPromoteExperiment added in v0.65.0

func (s *BaseSuite) AssertSuccessfulAgentPromoteExperiment(version string)

AssertSuccessfulAgentPromoteExperiment that experiment was promoted successfully

func (*BaseSuite) AssertSuccessfulAgentStartExperiment added in v0.65.0

func (s *BaseSuite) AssertSuccessfulAgentStartExperiment(version string)

AssertSuccessfulAgentStartExperiment that experiment started successfully

func (*BaseSuite) AssertSuccessfulConfigPromoteExperiment added in v0.68.0

func (s *BaseSuite) AssertSuccessfulConfigPromoteExperiment(configID string)

AssertSuccessfulConfigPromoteExperiment that config experiment was promoted successfully

func (*BaseSuite) AssertSuccessfulConfigStartExperiment added in v0.68.0

func (s *BaseSuite) AssertSuccessfulConfigStartExperiment(configID string)

AssertSuccessfulConfigStartExperiment that config experiment started successfully

func (*BaseSuite) AssertSuccessfulConfigStopExperiment added in v0.68.0

func (s *BaseSuite) AssertSuccessfulConfigStopExperiment()

AssertSuccessfulConfigStopExperiment that config experiment was stopped successfully

func (*BaseSuite) BeforeTest added in v0.64.0

func (s *BaseSuite) BeforeTest(suiteName, testName string)

BeforeTest creates a new Datadog Installer and sets the output logs directory for each tests

func (*BaseSuite) CurrentAgentVersion added in v0.64.0

func (s *BaseSuite) CurrentAgentVersion() *AgentVersionManager

CurrentAgentVersion the version of the Agent in the current pipeline

func (*BaseSuite) InstallScript added in v0.64.0

func (s *BaseSuite) InstallScript() InstallScriptRunner

InstallScript returns the installer implementation. Override this method in your test suite to use a different implementation.

func (*BaseSuite) Installer added in v0.64.0

func (s *BaseSuite) Installer() DatadogInstallerRunner

Installer The Datadog Installer for testing.

func (*BaseSuite) MustStartExperimentCurrentVersion added in v0.65.0

func (s *BaseSuite) MustStartExperimentCurrentVersion()

MustStartExperimentCurrentVersion start an experiment with current version of the Agent

func (*BaseSuite) MustStartExperimentPreviousVersion added in v0.65.0

func (s *BaseSuite) MustStartExperimentPreviousVersion()

MustStartExperimentPreviousVersion starts an experiment with the previous version of the Agent

func (*BaseSuite) Require added in v0.64.0

func (s *BaseSuite) Require() *suiteasserts.SuiteAssertions

Require instantiates a suiteAssertions for the current suite. This allows writing assertions in a "natural" way, i.e.:

suite.Require().HasAService(...).WithUserSid(...)

Ideally this suite assertion would exist at a higher level of abstraction so that it could be shared by multiple suites, but for now it exists only on the Windows Datadog installer `BaseSuite` object.

func (*BaseSuite) SetCatalogWithCustomPackage added in v0.66.0

func (s *BaseSuite) SetCatalogWithCustomPackage(opts ...PackageOption) (TestPackageConfig, error)

SetCatalogWithCustomPackage sets the catalog with a custom package and returns the package config created from the opts.

func (*BaseSuite) SetInstallScriptImpl added in v0.67.0

func (s *BaseSuite) SetInstallScriptImpl(impl InstallScriptRunner)

SetInstallScriptImpl sets a custom installer implementation. Use this in your test suite's SetupSuite to override the default implementation.

func (*BaseSuite) SetInstaller added in v0.68.0

func (s *BaseSuite) SetInstaller(impl DatadogInstallerRunner)

SetInstaller sets a custom installer implementation. Use this in your test suite's SetupSuite to override the default implementation.

func (*BaseSuite) SetupSuite added in v0.64.0

func (s *BaseSuite) SetupSuite()

SetupSuite checks that the environment variables are correctly setup for the test

func (*BaseSuite) StableAgentVersion added in v0.64.0

func (s *BaseSuite) StableAgentVersion() *AgentVersionManager

StableAgentVersion the version of the last published stable agent

func (*BaseSuite) StartExperimentCurrentVersion added in v0.65.0

func (s *BaseSuite) StartExperimentCurrentVersion() (string, error)

StartExperimentCurrentVersion starts an experiment of current agent version

func (*BaseSuite) WaitForDaemonToStop added in v0.68.0

func (s *BaseSuite) WaitForDaemonToStop(f func(), b backoff.BackOff)

WaitForDaemonToStop waits for the daemon service PID to change after the function is called.

func (*BaseSuite) WaitForInstallerService added in v0.65.0

func (s *BaseSuite) WaitForInstallerService(state string) error

WaitForInstallerService waits for installer service to be expected state

func (*BaseSuite) WaitForServicesWithBackoff added in v0.68.0

func (s *BaseSuite) WaitForServicesWithBackoff(state string, b backoff.BackOff, services ...string) error

WaitForServicesWithBackoff waits for the specified services to be in the desired state using backoff retry.

type Catalog added in v0.65.0

type Catalog struct {
	Packages []PackageEntry `json:"packages"`
}

Catalog is a struct to represent a catalog of packages, used with the set-catalog subcommand

type ConfigExperiment added in v0.68.0

type ConfigExperiment struct {
	ID    string                 `json:"id"`
	Files []ConfigExperimentFile `json:"files"`
}

ConfigExperiment represents a configuration experiment for the Datadog Installer.

type ConfigExperimentFile added in v0.68.0

type ConfigExperimentFile struct {
	Path     string          `json:"path"`
	Contents json.RawMessage `json:"contents"`
}

ConfigExperimentFile represents a configuration file in a config experiment.

type DatadogInstallExe added in v0.67.0

type DatadogInstallExe struct {
	// contains filtered or unexported fields
}

DatadogInstallExe represents an interface to the Datadog Installer exe on the remote host. It handles the installation process using a direct executable approach.

func NewDatadogInstallExe added in v0.67.0

func NewDatadogInstallExe(env *environments.WindowsHost, opts ...Option) *DatadogInstallExe

NewDatadogInstallExe instantiates a new instance of the Datadog Installer exe running on a remote Windows host. It initializes the base installer with the provided options.

func (*DatadogInstallExe) Run added in v0.67.0

func (d *DatadogInstallExe) Run(opts ...Option) (string, error)

Run runs the Datadog Installer exe on the remote host.

type DatadogInstallScript added in v0.64.0

type DatadogInstallScript struct {
	// contains filtered or unexported fields
}

DatadogInstallScript represents an interface to the Datadog Install script on the remote host. It handles the installation process using a PowerShell script approach.

func NewDatadogInstallScript added in v0.64.0

func NewDatadogInstallScript(env *environments.WindowsHost, opts ...Option) *DatadogInstallScript

NewDatadogInstallScript instantiates a new instance of the Datadog Install Script running on a remote Windows host. It initializes the base installer with the provided options.

func (*DatadogInstallScript) Run added in v0.64.0

func (d *DatadogInstallScript) Run(opts ...Option) (string, error)

Run runs the Datadog Installer install script on the remote host.

type DatadogInstaller

type DatadogInstaller struct {
	// contains filtered or unexported fields
}

DatadogInstaller represents an interface to the Datadog Installer on the remote host.

func NewDatadogInstaller

func NewDatadogInstaller(env *environments.WindowsHost, msiURL, outputDir string) *DatadogInstaller

NewDatadogInstaller instantiates a new instance of the Datadog Installer running on a remote Windows host.

func (*DatadogInstaller) GarbageCollect added in v0.65.0

func (d *DatadogInstaller) GarbageCollect() (string, error)

GarbageCollect runs the garbage-collect command, removing unused packages.

func (*DatadogInstaller) Install

func (d *DatadogInstaller) Install(opts ...MsiOption) error

Install will attempt to install the Datadog Agent on the remote host. By default, it will use the installer from the current pipeline.

func (*DatadogInstaller) InstallExperiment

func (d *DatadogInstaller) InstallExperiment(packageName string, opts ...installer.PackageOption) (string, error)

InstallExperiment will attempt to use the Datadog Installer to start an experiment for the package given in parameter.

func (*DatadogInstaller) InstallPackage

func (d *DatadogInstaller) InstallPackage(packageName string, opts ...installer.PackageOption) (string, error)

InstallPackage will attempt to use the Datadog Installer to install the package given in parameter.

By default, it will use the package artifact from the current pipeline.

Note: This command is a direct call to the installer and does not use the daemon.

func (*DatadogInstaller) PromoteConfigExperiment added in v0.68.0

func (d *DatadogInstaller) PromoteConfigExperiment(packageName string) (string, error)

PromoteConfigExperiment promotes a config experiment through the daemon.

func (*DatadogInstaller) PromoteExperiment added in v0.65.0

func (d *DatadogInstaller) PromoteExperiment(packageName string) (string, error)

PromoteExperiment will use the Datadog Installer service to promote an experiment.

func (*DatadogInstaller) Purge added in v0.61.0

func (d *DatadogInstaller) Purge() (string, error)

Purge runs the purge command, removing all packages.

func (*DatadogInstaller) RemoveExperiment

func (d *DatadogInstaller) RemoveExperiment(packageName string) (string, error)

RemoveExperiment requests that the Datadog Installer removes a package on the remote host.

func (*DatadogInstaller) RemovePackage

func (d *DatadogInstaller) RemovePackage(packageName string) (string, error)

RemovePackage requests that the Datadog Installer removes a package on the remote host.

func (*DatadogInstaller) SetBinaryPath added in v0.67.0

func (d *DatadogInstaller) SetBinaryPath(path string)

SetBinaryPath sets the path to the Datadog Installer binary.

func (*DatadogInstaller) SetCatalog added in v0.65.0

func (d *DatadogInstaller) SetCatalog(newCatalog Catalog) (string, error)

SetCatalog configures the catalog for the Datadog Installer daemon.

func (*DatadogInstaller) SetConfigExperiment added in v0.68.0

func (d *DatadogInstaller) SetConfigExperiment(config ConfigExperiment) (string, error)

SetConfigExperiment sets the config catalog for the Datadog Installer daemon.

func (*DatadogInstaller) StartConfigExperiment added in v0.68.0

func (d *DatadogInstaller) StartConfigExperiment(packageName string, config ConfigExperiment) (string, error)

StartConfigExperiment starts a config experiment using the provided InstallerConfig through the daemon. It first sets the config catalog and then starts the experiment.

func (*DatadogInstaller) StartExperiment added in v0.65.0

func (d *DatadogInstaller) StartExperiment(packageName string, packageVersion string) (string, error)

StartExperiment will use the Datadog Installer service to start an experiment.

func (*DatadogInstaller) Status added in v0.60.0

func (d *DatadogInstaller) Status() (string, error)

Status returns the status provided by the running daemon

func (*DatadogInstaller) StopConfigExperiment added in v0.68.0

func (d *DatadogInstaller) StopConfigExperiment(packageName string) (string, error)

StopConfigExperiment stops a config experiment through the daemon.

func (*DatadogInstaller) StopExperiment added in v0.65.0

func (d *DatadogInstaller) StopExperiment(packageName string) (string, error)

StopExperiment will use the Datadog Installer service to stop an experiment.

func (*DatadogInstaller) Uninstall

func (d *DatadogInstaller) Uninstall(opts ...MsiOption) error

Uninstall will attempt to uninstall the Datadog Agent on the remote host.

func (*DatadogInstaller) Version

func (d *DatadogInstaller) Version() (string, error)

Version returns the version of the Datadog Installer on the host.

type DatadogInstallerGA added in v0.68.0

type DatadogInstallerGA struct {
	*DatadogInstaller
}

DatadogInstallerGA represents an interface to the Datadog Installer on the remote host for GA versions (7.65.x). It handles special cases for the 7.65.x versions of the installer.

We still check the version because the version may change during the test run, e.g. during MustStartExperiment, so this type mainly serves to keep the special case logic out of the normal DatadogInstaller type so we don't unintentially apply it to other tests.

func (*DatadogInstallerGA) StartExperiment added in v0.68.0

func (d *DatadogInstallerGA) StartExperiment(packageName string, packageVersion string) (string, error)

StartExperiment will use the Datadog Installer service to start an experiment. For 7.65.x versions, it uses the start-installer-experiment subcommand.

func (*DatadogInstallerGA) StartInstallerExperiment added in v0.68.0

func (d *DatadogInstallerGA) StartInstallerExperiment(packageName string, packageVersion string) (string, error)

StartInstallerExperiment will use the Datadog Installer service to start an experiment for the Agent package.

Only needed for 7.65, future versions use the start-experiment subcommand instead.

func (*DatadogInstallerGA) StopExperiment added in v0.68.0

func (d *DatadogInstallerGA) StopExperiment(packageName string) (string, error)

StopExperiment will use the Datadog Installer service to stop an experiment for the Agent package.

Workarounds: - ignore EOF errors

type DatadogInstallerRunner added in v0.68.0

type DatadogInstallerRunner interface {
	// type  helpers
	SetBinaryPath(path string)

	// subcommands
	Version() (string, error)
	SetCatalog(newCatalog Catalog) (string, error)
	StartExperiment(packageName string, packageVersion string) (string, error)
	PromoteExperiment(packageName string) (string, error)
	StopExperiment(packageName string) (string, error)
	InstallPackage(packageName string, opts ...installer.PackageOption) (string, error)
	InstallExperiment(packageName string, opts ...installer.PackageOption) (string, error)
	RemovePackage(packageName string) (string, error)
	RemoveExperiment(packageName string) (string, error)
	Status() (string, error)
	Purge() (string, error)
	GarbageCollect() (string, error)
	SetConfigExperiment(config ConfigExperiment) (string, error)
	StartConfigExperiment(packageName string, config ConfigExperiment) (string, error)
	PromoteConfigExperiment(packageName string) (string, error)
	StopConfigExperiment(packageName string) (string, error)

	// MSI commands
	// TODO: we should separate installation from the command line interface
	Install(opts ...MsiOption) error
	Uninstall(opts ...MsiOption) error
}

DatadogInstallerRunner represents an interface for the Datadog Installer

type InstallScriptRunner added in v0.67.0

type InstallScriptRunner interface {
	Run(opts ...Option) (string, error)
}

InstallScriptRunner represents an interface for installing Datadog on Windows.

type MsiOption added in v0.64.0

type MsiOption func(*MsiParams) error

MsiOption is an optional function parameter type for the Datadog Installer Install command

func WithMSIArg

func WithMSIArg(arg string) MsiOption

WithMSIArg uses a specific URL for the Datadog Installer Install command instead of using the pipeline URL.

func WithMSIDevEnvOverrides added in v0.65.0

func WithMSIDevEnvOverrides(prefix string) MsiOption

WithMSIDevEnvOverrides applies overrides to the MSI source config based on environment variables.

Example: local MSI package file

export CURRENT_AGENT_MSI_URL="file:///path/to/msi/package.msi"

Example: from a different pipeline

export CURRENT_AGENT_MSI_PIPELINE="123456"

Example: stable version from installers_v2.json

export CURRENT_AGENT_MSI_VERSION=7.60.0-1"

Example: custom URL

export CURRENT_AGENT_MSI_URL="https://s3.amazonaws.com/dd-agent-mstesting/builds/beta/ddagent-cli-7.64.0-rc.9.msi"

func WithMSILogFile added in v0.58.0

func WithMSILogFile(filename string) MsiOption

WithMSILogFile sets the filename for the MSI log file, to be stored in the output directory.

func WithOption added in v0.64.0

func WithOption(opt Option) MsiOption

WithOption converts an Option to an MsiOption (downcast) allowing to use the base Option methods on with a func that accepts MsiOptions

type MsiParams added in v0.64.0

type MsiParams struct {
	Params
	// contains filtered or unexported fields
}

MsiParams contains the optional parameters for the Datadog Installer Install command

type Option

type Option func(*Params) error

Option is an optional function parameter type for the Params

func WithAgentUser added in v0.65.0

func WithAgentUser(user string) Option

WithAgentUser sets the user to install the agent as

func WithExtraEnvVars added in v0.64.0

func WithExtraEnvVars(envVars map[string]string) Option

WithExtraEnvVars specifies additional environment variables.

func WithInstallScriptDevEnvOverrides added in v0.67.0

func WithInstallScriptDevEnvOverrides(prefix string) Option

WithInstallScriptDevEnvOverrides applies overrides to use local files for development.

Example: local installer exe

export CURRENT_AGENT_INSTALLER_URL="file:///path/to/installer.exe"

Example: local install script

export CURRENT_AGENT_INSTALLER_SCRIPT="file:///path/to/install.ps1"

func WithInstallerScript added in v0.65.0

func WithInstallerScript(installerScript string) Option

WithInstallerScript uses a specific URL for the Datadog Installer script command instead of using the pipeline script.

func WithInstallerURL

func WithInstallerURL(installerURL string) Option

WithInstallerURL uses a specific URL for the Datadog Installer Install command instead of using the pipeline URL.

func WithURLFromInstallersJSON added in v0.65.0

func WithURLFromInstallersJSON(jsonURL, version string) Option

WithURLFromInstallersJSON uses a specific URL for the Datadog Installer from an installers_v2.json file. jsonURL: The URL of the installers_v2.json file, i.e. pipeline.StableURL version: The artifact version to retrieve, i.e. "7.56.0-installer-0.4.5-1"

Example: WithInstallerURLFromInstallersJSON(pipeline.StableURL, "7.56.0-installer-0.4.5-1") will look into "https://s3.amazonaws.com/ddagent-windows-stable/stable/installers_v2.json" for the Datadog Installer version "7.56.0-installer-0.4.5-1"

func WithURLFromPipeline added in v0.65.0

func WithURLFromPipeline(pipelineID string) Option

WithURLFromPipeline uses the Datadog Installer MSI from a pipeline artifact.

type PackageEntry added in v0.65.0

type PackageEntry struct {
	Package string `json:"package"`
	Version string `json:"version"`
	URL     string `json:"url"`
}

PackageEntry is a struct to represent a package entry in the catalog

type PackageOption added in v0.65.0

type PackageOption func(*TestPackageConfig) error

PackageOption is an optional function parameter type for the Datadog Installer

func WithAlias added in v0.65.0

func WithAlias(alias string) PackageOption

WithAlias specifies the package's alias.

func WithAuthentication added in v0.65.0

func WithAuthentication(auth string) PackageOption

WithAuthentication uses a specific authentication for a Registry to install the package.

func WithDevEnvOverrides added in v0.65.0

func WithDevEnvOverrides(prefix string) PackageOption

WithDevEnvOverrides applies overrides to the package config based on environment variables.

Example: local OCI package file

export CURRENT_AGENT_OCI_URL="file:///path/to/oci/package.tar"

Example: from a different pipeline

export CURRENT_AGENT_OCI_PIPELINE="123456"

Example: from a different pipeline (assumes that the package being overridden is already from a pipeline)

export CURRENT_AGENT_OCI_VERSION="pipeline-123456"

Example: custom URL

export CURRENT_AGENT_OCI_URL="oci://installtesting.datad0g.com/agent-package:pipeline-123456"

func WithName added in v0.65.0

func WithName(name string) PackageOption

WithName uses a specific name for the package.

func WithPackage added in v0.66.0

func WithPackage(pkg TestPackageConfig) PackageOption

WithPackage copies fields from the package

func WithPipeline added in v0.65.0

func WithPipeline(pipeline string) PackageOption

WithPipeline configures the package to be installed from a pipeline.

func WithRegistry added in v0.65.0

func WithRegistry(registryURL string) PackageOption

WithRegistry uses a specific Registry from where to install the package.

func WithURLOverride added in v0.65.0

func WithURLOverride(url string) PackageOption

WithURLOverride specifies the package's URL.

func WithVersion added in v0.65.0

func WithVersion(version string) PackageOption

WithVersion uses a specific version of the package.

type PackageVersion

type PackageVersion struct {
	// contains filtered or unexported fields
}

PackageVersion is a helper type to store both the version and the package version of a binary. The package version has the "-1" suffix, whereas the binary's "version" command does not contain the "-1" suffix.

func NewVersionFromPackageVersion added in v0.65.0

func NewVersionFromPackageVersion(packageVersion string) PackageVersion

NewVersionFromPackageVersion creates a new PackageVersion from a package version string

func (PackageVersion) PackageVersion

func (v PackageVersion) PackageVersion() string

PackageVersion the version with the package suffix

func (PackageVersion) Version

func (v PackageVersion) Version() string

Version the version without the package suffix

type Params

type Params struct {
	// contains filtered or unexported fields
}

Params contains the optional parameters for the Datadog Install Script command

type TestPackageConfig added in v0.65.0

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
	// contains filtered or unexported fields
}

TestPackageConfig is a struct that regroups the fields necessary to install a package from an OCI Registry

func CreatePackageSourceIfLocal added in v0.65.0

func CreatePackageSourceIfLocal(host *components.RemoteHost, pkg TestPackageConfig) (TestPackageConfig, error)

CreatePackageSourceIfLocal will create a package on the remote host if the URL is a local file. This is useful for development to test local packages.

func NewPackageConfig added in v0.65.0

func NewPackageConfig(opts ...PackageOption) (TestPackageConfig, error)

NewPackageConfig is a struct that regroups the fields necessary to install a package from an OCI Registry

func (TestPackageConfig) URL added in v0.65.0

func (c TestPackageConfig) URL() string

URL returns the OCI URL of the package

It may begin with `file://` if the package is local.

Directories

Path Synopsis
Package consts list the common packages paths used in the Datadog Installer tests.
Package consts list the common packages paths used in the Datadog Installer tests.
Package assertions provide custom assertions for Windows tests
Package assertions provide custom assertions for Windows tests
Package suiteasserts extends require.Assertions with custom assertions
Package suiteasserts extends require.Assertions with custom assertions
suites
apm-library-dotnet-package
Package dotnettests contains the E2E tests for the .NET APM Library package.
Package dotnettests contains the E2E tests for the .NET APM Library package.

Jump to

Keyboard shortcuts

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