Skip to content

Commit d002dc6

Browse files
fix: use --force-confold for deb tests in TestUpgradeAgentWithTamperProtectedEndpoint_DEB (#8649)
1 parent 75fa94a commit d002dc6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testing/integration/endpoint_security_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ func getInstallCommand(ctx context.Context, packageFormat string, srcPkg string,
152152

153153
switch packageFormat {
154154
case "deb":
155-
args = append(args, "dpkg", "-i")
155+
// since the previous agent is enrolled it means that the /etc/elastic-agent/elastic-agent.yml has changed
156+
// and dpkg will ask if we want to overwrite it. Since this is a non-interactive install we need to
157+
// force to keep the existing config
158+
args = append(args, "dpkg", "--force-confold", "-i")
156159
case "rpm":
157160
args = append(args, "rpm", "-Uvh", "--force")
158161
default:

0 commit comments

Comments
 (0)