Skip to content
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

Rename define.NewFixture to define.NewFixtureFromLocalBuild #4562

Merged
merged 2 commits into from
May 3, 2024

Conversation

AndersonQ
Copy link
Member

@AndersonQ AndersonQ commented Apr 11, 2024

What does this PR do?

Rename define.NewFixture to define.NewFixtureFromLocalBuild

Why is it important?

There were two NewFixture functions returning the same fixture: testing.NewFixture and define.NewFixture. They basically differ on where the agent package comes from. This is rather confusing and easily lead to mistakes.
testing.NewFixture is the one which actually creates the fixture, whereas define.NewFixture is a wrapper around testing.NewFixture so it'll use the locally built agent artifact. Therefore define.NewFixture was renamed to define.NewFixtureFromLocalBuild, better reflecting what it does.

Checklist

  • 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

Related issues

  • N/A

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@AndersonQ AndersonQ added enhancement New feature or request Testing labels Apr 11, 2024
@AndersonQ AndersonQ self-assigned this Apr 11, 2024
@AndersonQ AndersonQ requested a review from a team as a code owner April 11, 2024 09:46
@AndersonQ AndersonQ requested review from blakerouse and pchila April 11, 2024 09:46
Copy link
Contributor

mergify bot commented Apr 11, 2024

This pull request does not have a backport label. Could you fix it @AndersonQ? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

@ycombinator ycombinator merged commit f2011e4 into elastic:main May 3, 2024
9 checks passed
michalpristas added a commit to michalpristas/elastic-agent that referenced this pull request May 6, 2024
michalpristas added a commit that referenced this pull request May 6, 2024
@AndersonQ AndersonQ deleted the rename-define-newfixture branch June 6, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants