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: fix flaky ro webhook e2e test #873

Closed
wants to merge 4 commits into from
Closed

Conversation

britaniar
Copy link
Contributor

@britaniar britaniar commented Jul 8, 2024

Description of your changes

Fixes #

I have:

  • For webhook failure, ensure both are selecting the same resource.

  • For already exists failure, there are only two places that use "test-ro" so differentiated the names so that they don't overlap. In one instance it should get denied when trying to create, while in the other it gets created and then deleted.

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Special notes for your reviewer

@britaniar britaniar marked this pull request as ready for review July 9, 2024 01:54
@@ -1201,7 +1201,7 @@ var _ = Describe("webhook tests for ResourceOverride UPDATE operations", Ordered
By("creating a new resource override")
ro1 := &placementv1alpha1.ResourceOverride{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("test-ro-%d", GinkgoParallelProcess()),
Name: ro1Name,
Copy link
Contributor

Choose a reason for hiding this comment

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

have you figured out which test is creating the RO at the same time? Could you please explain why you believe the PR will fix the issue?

ro1 := &placementv1alpha1.ResourceOverride{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("test-ro-%d", GinkgoParallelProcess()),
Name: fmt.Sprintf("test-create-ro-%d", GinkgoParallelProcess()),
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think this's the root cause. this create should always fail and ro cannot be created in this case.

@britaniar britaniar closed this Jul 26, 2024
@britaniar britaniar deleted the flakye2e branch July 26, 2024 17:03
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