Skip to content

feat: singleTest mage target for each integration test package #8691

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pkoutsovasilis
Copy link
Contributor

@pkoutsovasilis pkoutsovasilis commented Jun 26, 2025

What does this PR do?

As request in previous PR reviews this PR introduces Single mage targets for the serverless and leak integration test packages, similar to the existing TestKubernetesSingle target. It adds the following functions to the magefile.go:

  • TestServerlessSingle
  • TestForResourceLeaksSingle

Internally, both new targets delegate to shared helper functions that support selecting a specific test by name. This unifies the way we run individual integration tests across packages and prepares the mage targets for further package splits.

Why is it important?

As part of the effort to split the increasingly large integration test suite into smaller dedicated packages (see parent issue), we also need to ensure that developers can run individual tests from each new package using a consistent interface.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

None. This PR only introduces new mage targets for developer convenience without affecting existing workflows.

How to test this PR locally

Invoke the new mage targets 🙂

Related issues

@pkoutsovasilis pkoutsovasilis self-assigned this Jun 26, 2025
@pkoutsovasilis pkoutsovasilis added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog backport-active-all Automated backport with mergify to all the active branches labels Jun 26, 2025
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@pkoutsovasilis pkoutsovasilis marked this pull request as ready for review June 27, 2025 06:22
@pkoutsovasilis pkoutsovasilis requested a review from a team as a code owner June 27, 2025 06:22
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@ycombinator
Copy link
Contributor

Please also update https://github.com/elastic/elastic-agent/blob/main/docs/test-framework-dev-guide.md#running-the-tests but maybe we should mention something more generic there and ask developers to rely on mage -l instead of spelling out every single possible integration testing target?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-active-all Automated backport with mergify to all the active branches skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce singleTest mage target for each integration test package
3 participants