-
Notifications
You must be signed in to change notification settings - Fork 176
[tests] split up serverless and resource leaks integration tests #8396
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
[tests] split up serverless and resource leaks integration tests #8396
Conversation
@pchila @ycombinator please have a look and let's sync 🙂 |
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you for splitting out runtime leak and serverless tests into dedicated packages.
The work on the serverless test could be used to simplify #8263 change to a more manageable size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just added a very tiny nits
…gration-tests.ps1
…ourceLeaks in test-framework-dev-guide.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I reviewed the .buildkite
folder, again my nits are super-nit.
f088a5f
|
💚 Build Succeeded
History
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I reviewed the recent changes in the .buldkite
folder after reviewing them earlier too :)
Thank you for your collaboration on the various review comments 🙇
@Mergifyio backport 8.17 8.18 8.19 9.0 |
✅ Backports have been created
|
* 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/buildkite-integration-tests.sh # .buildkite/scripts/integration-tests.ps1 # testing/integration/auditd_monitoring_test.go # testing/integration/fleetserver_test.go # testing/integration/logs_ingestion_test.go # testing/integration/network_traffic_monitoring_test.go # testing/integration/osquery_monitoring_test.go
* 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/buildkite-integration-tests.sh # .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
* 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
* 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/buildkite-integration-tests.sh # .buildkite/scripts/integration-tests.ps1 # testing/integration/auditd_monitoring_test.go # testing/integration/network_traffic_monitoring_test.go # testing/integration/osquery_monitoring_test.go
… integration tests (#8458) * [tests] split up serverless and resource leaks integration tests (#8396) * 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/buildkite-integration-tests.sh # .buildkite/scripts/integration-tests.ps1 # testing/integration/auditd_monitoring_test.go # testing/integration/network_traffic_monitoring_test.go # testing/integration/osquery_monitoring_test.go * fix: resolve conflicts * fix: remove -integration.fips flag --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
…s integration tests (#8457) * [tests] split up serverless and resource leaks integration tests (#8396) * 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 * fix: resolve conflicts * fix: remove irrelevant files * fix: point to the correct path for "fleet-server.json" in TestInstallFleetServerBootstrap --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
…s integration tests (#8456) * [tests] split up serverless and resource leaks integration tests (#8396) * 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/buildkite-integration-tests.sh # .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 * fix: resolve conflicts * fix: remove irrelevant files * fix: remove -integration.fips flag * fix: point to the correct path for "fleet-server.json" in TestInstallFleetServerBootstrap --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
…ts-oblt-cli * feature/serverless-its-oblt-cli: (51 commits) as agreed let's move the group to the kb.integration pipeline Update .github/workflows/serverless-project.yml ci: invoke serverless integration tests package from BK github-actions: create a serverless project daily [tests] split up serverless and resource leaks integration tests (#8396) chore: Update to elastic/beats@dfdc12e33de0 (#8446) Lock upgrade marker (#8254) build(deps): bump github.com/elastic/elastic-agent-system-metrics from 0.11.12 to 0.11.13 (#8420) Add docker image name template and renamed fips cloud specs (#8429) buildkite(scripts): refactor common scripts (#8365) Use require.Eventually to try and address flakiness (#8421) Fix pre-command to support extended testing (#8418) [Automation] Bump Golang version to 1.24.4 (#8384) chore: Update to elastic/beats@aed2a8b768bd (#8423) [main][Automation] Update versions (#8425) Add Pipeline to deploy custom agent image for FIPS testing (#8035) ci: automatically update OTel components (#8288) [Automation] Bump VM Image version to 1749258065 (#8390) fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault (#8374) otel: add cumulativetodeltaprocessor to EDOT collector (#8372) ...
…s integration tests (#8455) * [tests] split up serverless and resource leaks integration tests (#8396) * 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/buildkite-integration-tests.sh # .buildkite/scripts/integration-tests.ps1 # testing/integration/auditd_monitoring_test.go # testing/integration/fleetserver_test.go # testing/integration/logs_ingestion_test.go # testing/integration/network_traffic_monitoring_test.go # testing/integration/osquery_monitoring_test.go * fix: resolve conflicts * fix: go fmt * fix: remove irrelevant files * fix: remove -integration.fips flag * fix: point to the correct path for "fleet-server.json" in TestInstallFleetServerBootstrap --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
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