kuadrant-operator
kuadrant-operator copied to clipboard
DNSPolicy: Update all integration tests to validate the structure of the produced DNSrecord endpoints
What
Add a validation function that can be called by every dnspolicy integration test to check the integrity of the DNSRecord endpoints being generated. It should test whether one dnsName (i.e. <clusterHash>-<gwHash>.klb.test.example.com) can be reached from another dnsName (test.example.com) by inspecting the dnsName and targets of each endpoint in the record.
Example pass( test.example.com -> clusterHash-gwHash.klb.test.example.com):
- test.example.com (klb.test.example.com)
- klb.test.example.com (default.klb.test.example.com)
- default.klb.test.example.com(clusterHash-gwHash.klb.test.example.com)
- clusterHash-gwHash.klb.test.example.com (127.0.0.1)
Example fail( test.example.com -> clusterHash-gwHash.klb.test.example.com):
- test.example.com (klb.test.example.com)
- klb.test.example.com (default.klb.test.example.com)
- clusterHash-gwHash.klb.test.example.com (127.0.0.1)
How
- [ ] Add validation function that takes in a
from->todnsName as input and returns true or false - [ ] Update all dnsPolicy integration tests that generate a DNSRecord to call this function