fix: use --force-confold for deb tests in TestUpgradeAgentWithTamperProtectedEndpoint_DEB #8649
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.





What does this PR do?
This PR fixes an issue in the
TestUpgradeAgentWithTamperProtectedEndpoint_DEBintegration test wheredpkgwould prompt to overwrite the modifiedelastic-agent.ymlconfiguration file during agent upgrade.To make the test non-interactive and preserve the existing configuration, the test now uses the
--force-confoldflag when installing.debpackages viadpkg -i.PS: this was already introduced in
8.19by this PR #8646 which such a failure was actually occurringWhy is it important?
Without this fix, the test could hang or fail because
dpkgdetects that the configuration file at/etc/elastic-agent/elastic-agent.ymlwas modified after enrollment and prompts the user to choose between keeping or replacing it. Since the test runs in a non-interactive context, the prompt leads to unexpected behavior.Using
--force-confoldensures that the test continues smoothly and keeps the current configuration as expected during same-version or upgrade installs since this test is featuring elastic-agents enrolled to fleet.Checklist
./changelog/fragmentsusing the changelog toolDisruptive User Impact
None. This change only affects the test harness logic and does not alter agent behavior or packaging.
How to test this PR locally
Related issues