Skip to content

Commit 825a894

Browse files
committed
add custom install path as Windows install Agent option
1 parent 69c2fd5 commit 825a894

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

components/datadog/agentparams/msi/install_params.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package msi
22

33
import (
44
"fmt"
5-
"github.com/DataDog/test-infra-definitions/components/datadog/fakeintake"
65
"reflect"
6+
7+
"github.com/DataDog/test-infra-definitions/components/datadog/fakeintake"
78
)
89

910
// InstallAgentParams are the parameters used for installing the Agent using msiexec.
@@ -12,6 +13,7 @@ type InstallAgentParams struct {
1213
AgentUserPassword string `installer_arg:"DDAGENTUSER_PASSWORD"`
1314
DdURL string `installer_arg:"DD_URL"`
1415
Site string `installer_arg:"SITE"`
16+
InstallPath string `installer_arg:"APPLICATIONDATADIRECTORY"`
1517
InstallLogFile string `installer_arg:"/log"`
1618
}
1719

@@ -94,3 +96,10 @@ func WithInstallLogFile(logFileName string) InstallAgentOption {
9496
func WithFakeIntake(fakeIntake *fakeintake.FakeintakeOutput) InstallAgentOption {
9597
return WithDdURL(fakeIntake.URL)
9698
}
99+
100+
// WithFakeIntake configures the Agent to use a fake intake URL.
101+
func WithCustomInstallPath(installPath string) InstallAgentOption {
102+
return func(i *InstallAgentParams) {
103+
i.InstallPath = installPath
104+
}
105+
}

0 commit comments

Comments
 (0)