kuadrant-operator icon indicating copy to clipboard operation
kuadrant-operator copied to clipboard

DNSPolicy: Update all integration tests to validate the structure of the produced DNSrecord endpoints

Open mikenairn opened this issue 1 year ago • 0 comments

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):

  1. test.example.com (klb.test.example.com)
  2. klb.test.example.com (default.klb.test.example.com)
  3. default.klb.test.example.com(clusterHash-gwHash.klb.test.example.com)
  4. clusterHash-gwHash.klb.test.example.com (127.0.0.1)

Example fail( test.example.com -> clusterHash-gwHash.klb.test.example.com):

  1. test.example.com (klb.test.example.com)
  2. klb.test.example.com (default.klb.test.example.com)
  3. clusterHash-gwHash.klb.test.example.com (127.0.0.1)

How

  • [ ] Add validation function that takes in a from -> to dnsName as input and returns true or false
  • [ ] Update all dnsPolicy integration tests that generate a DNSRecord to call this function

mikenairn avatar Apr 17 '24 10:04 mikenairn