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: Add dns record deletion tests (orphan records) #942

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

mikenairn
Copy link
Member

Adds/Updates tests to better cover dnsrecord deletion scenarios.

Requires: #941

//err := k8sClient.Get(ctx, client.ObjectKeyFromObject(gateway), gateway)
//g.Expect(err).NotTo(HaveOccurred())
//g.Expect(gateway.Annotations).ToNot(HaveKey(v1alpha1.DNSPolicyDirectReferenceAnnotationName))
//g.Expect(gateway.Annotations).ToNot(HaveKeyWithValue(v1alpha1.DNSPolicyBackReferenceAnnotationName, policiesBackRefValue))
Copy link
Member Author

@mikenairn mikenairn Oct 15, 2024

Choose a reason for hiding this comment

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

All these back references will be removed as part of the SOTW so we don't really need to worry about fixing these. More just here for me to understand what should be happening currently.

),
)
//ToDo (mnairn) Theres a bug here, this never gets reset when all records are removed due to target removal
//g.Expect(dnsPolicy.Status.TotalRecords).To(Equal(int32(0)))
Copy link
Member Author

Choose a reason for hiding this comment

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

Issues with the record count will be resolved by the SOTW status reconciler updates.

@mikenairn mikenairn force-pushed the add_dns_record_deletion_tests branch 2 times, most recently from 618721d to aee0a40 Compare October 16, 2024 08:40
{
Type: ptr.To(gatewayapiv1.IPAddressType),
//Using the same address can cause a panic in the inmemory provider see https://github.com/Kuadrant/dns-operator/issues/272
Value: "172.1.1.1",
Copy link
Member Author

Choose a reason for hiding this comment

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

@mikenairn mikenairn changed the title tests: Add dns record deletion tests tests: Add dns record deletion tests (orphan records) Oct 16, 2024
@mikenairn mikenairn marked this pull request as ready for review October 16, 2024 08:42
@mikenairn
Copy link
Member Author

@KevFan I haven't reviewed the the TLS tests, but we should probably make sure we have appropriate test coverage there also.

@mikenairn mikenairn requested a review from KevFan October 16, 2024 09:34
Adds/Updates tests to better cover dnsrecord deletion scenarios.

Signed-off-by: Michael Nairn <[email protected]>
@mikenairn mikenairn force-pushed the add_dns_record_deletion_tests branch from aee0a40 to 9ccf0b2 Compare October 16, 2024 11:29
Copy link
Collaborator

@maleck13 maleck13 left a comment

Choose a reason for hiding this comment

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

/lgtm

@mikenairn mikenairn merged commit 5d76689 into Kuadrant:main Oct 16, 2024
24 checks passed
@mikenairn mikenairn deleted the add_dns_record_deletion_tests branch October 16, 2024 12:32
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