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

tests: Fix flaky tests and cleanup leftover resources in tests #10198

Merged
merged 4 commits into from
Oct 10, 2024

Conversation

davidjumani
Copy link
Contributor

Description

Cleanup leftover resources in tests that can cause pollution.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@github-actions github-actions bot added keep pr updated signals bulldozer to keep pr up to date with base branch work in progress signals bulldozer to keep pr open (don't auto-merge) labels Oct 10, 2024
Copy link

github-actions bot commented Oct 10, 2024

Visit the preview URL for this PR (updated for commit b68710a):

https://gloo-edge--pr10198-cleanup-tests-cvboxxth.web.app

(expires Thu, 17 Oct 2024 15:23:04 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

Comment on lines +48 to +55
err := s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, testdefaults.NginxPodManifest)
s.Assert().NoError(err)
// Check that test resources are running
s.testInstallation.Assertions.EventuallyPodsRunning(s.ctx, testdefaults.NginxPod.ObjectMeta.GetNamespace(), metav1.ListOptions{
LabelSelector: "app.kubernetes.io/name=nginx",
})

err = s.testInstallation.Actions.Kubectl().ApplyFile(s.ctx, validation.ExampleUpstream, "-n", s.testInstallation.Metadata.InstallNamespace)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could fix a nightly failure where the upsteam is in a warning state since the endpoint is not present.

@davidjumani davidjumani changed the title tests: Cleanup leftover resources in tests tests: Fix flaky tests and cleanup leftover resources in tests Oct 10, 2024
@davidjumani davidjumani removed the work in progress signals bulldozer to keep pr open (don't auto-merge) label Oct 10, 2024
Copy link
Contributor

@nfuden nfuden left a comment

Choose a reason for hiding this comment

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

For now this makes sense I do really dislike the per test specific work

Copy link
Contributor

@jenshu jenshu left a comment

Choose a reason for hiding this comment

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

similar to the other PR, i think it would be good to refactor so that all manifests are applied in BeforeTest and deleted in AfterTest, to make sure we don't miss anything

@soloio-bulldozer soloio-bulldozer bot merged commit d92d3d2 into main Oct 10, 2024
19 checks passed
@soloio-bulldozer soloio-bulldozer bot deleted the cleanup-tests branch October 10, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants