-
Notifications
You must be signed in to change notification settings - Fork 438
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
Conversation
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 |
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) |
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.
This could fix a nightly failure where the upsteam is in a warning state since the endpoint is not present.
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.
For now this makes sense I do really dislike the per test specific work
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.
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
Description
Cleanup leftover resources in tests that can cause pollution.
Checklist: