-
Notifications
You must be signed in to change notification settings - Fork 175
[8.19] (backport #8396) [tests] split up serverless and resource leaks integration tests #8457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* fix: expose PreinstalledPackages * fix: make groups.go importable * feat: introduce new leak package for integration tests * feat: introduce new serverless package for integration tests * feat: incorporate serverless and extended runtime leak tests in mage * fix: normalise powershell (windows) and bash (unix) integration tests invocation flow * fix: use -test prefixed args for test-wise argument in buildkite-integration-tests.ps1 * fix: add comment about test timeout 2h0m0s * fix: correct wording * doc: add integration:TestServerless and update integration:TestForResourceLeaks in test-framework-dev-guide.md * fix: return directly the test exit code for ps1 scripts * fix: rename file that host TestMain to main_test.go * fix: correct build tags for serverless integration tests package * fix: leverage log.Fatalf in serverless/main_test.go * feat: expand the BK log group on failure * tmp: introduce artificial test failure to test buildkite logging group expansion * Revert "tmp: introduce artificial test failure to test buildkite logging group expansion" This reverts commit ee6bd63. * fix: typo * fix: remove redundant BK log group expansion (cherry picked from commit 92e139c) # Conflicts: # .buildkite/scripts/integration-tests.ps1 # testing/integration/auditd_monitoring_test.go # testing/integration/fleetserver_test.go # testing/integration/network_traffic_monitoring_test.go # testing/integration/osquery_monitoring_test.go
Cherry-pick of 92e139c has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
let's wait for the CI run on main to finish (92e139c), I want to be extra careful before merging this backport 🙂 |
|
💚 Build Succeeded
History
|
What does this PR do?
This PR refactors the Elastic Agent integration test structure by introducing dedicated sub-packages for specific test categories. The changes include:
serverless
andleak
test packages undertesting/integration/
, each with their ownTestMain
.leak
package and removed the dependency on theTEST_LONG_RUNNING
env var.TestLogIngestionFleetManaged
into a reusable function and invoked it from bothintegration
andserverless
packages.PreinstalledPackages
public and importable by other test packages.groups_test.go
togroups.go
to support shared usage.mage integration:check
to validate all test packages (integration/
,integration/serverless
,integration/leak
).Why is it important?
The
testing/integration
package had grown into a monolithic and hard-to-maintain suite containing various unrelated test types. This structural refactor:TestMain
implementations per package for better control of setup/teardown behavior.Checklist
./changelog/fragments
using the changelog toolDisruptive User Impact
None expected for end-users. CI and internal contributors may need to adjust test invocation to use the correct package path or mage targets (e.g.,
mage integration:testServerless
,integration:testForResourceLeaks
).How to test this PR locally
Related issues
This is an automatic backport of pull request #8396 done by [Mergify](https://mergify.com).