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

Fix test to work on dev machines #2737

Merged
merged 1 commit into from
Apr 24, 2023
Merged

Conversation

carolynvs
Copy link
Member

What does this change

I have updated this test to only check for the desired string, and not attempt to match the entire debug output generated by porter, which can contain stray debug lines depending on the dev env. For example, on my machine I have telemetry enabled but when the backing otel collector is down, porter logs debug lines that it can't connect. The test is failing locally for me cause the test is requiring that ONLY that one line is printed, instead of just checking if the line was printed at all (more accurate and less fragile).

Since the test is intended to check that we are ****'ing out sensitive words, it doesn't need to be that strict.

What issue does it fix

Avoids test flakes when running integration tests on a local dev env.

Notes for the reviewer

N/A

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

I have updated this test to only check for the desired string, and not attempt to match the entire debug output generated by porter, which can contain stray debug lines depending on the dev env.
For example, on my machine I have telemetry enabled but when the backing otel collector is down, porter logs debug lines that it can't connect. The test is failing locally for me cause the test is requiring that ONLY that one line is printed, instead of just checking if the line was printed at all (more accurate and less fragile).

Since the test is intended to check that we are ****'ing out sensitive words, it doesn't need to be that strict.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
@carolynvs carolynvs marked this pull request as ready for review April 20, 2023 19:38
Copy link
Contributor

@arschles arschles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. LGTM

@carolynvs carolynvs merged commit ff46692 into getporter:main Apr 24, 2023
@carolynvs carolynvs deleted the fix-test branch April 24, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants