kuadrant-operator
kuadrant-operator copied to clipboard
DNSPolicy: Add routing strategy type conflict test
What
Add a test that checks the status of a DNSPolicy that has a conflicting strategy to an existing DNSPolicy with the same dnsName.
Steps:
- Create Gateway 1 with listener foo -> foo.example.com
- Create Gateway 2 with listener foo -> foo.example.com
- Update status of gateway 1 to show attached routes for listener foo and address (127.0.0.1)
- Update status of gateway 2 to show attached routes for listener foo and address (127.0.0.1)
- Create DNSPolicy 1 targeting gateway 1 with a
simplerouting strategy - Verify DNSPolicy 1 becomes ready and the expected DNSRecord is created and ready
- Create DNSPolicy 2 targeting gateway 2 with a
loadbalancedrouting strategy - Verify DNSPolicy 2 does not become ready and the expected DNSRecord is created but not ready and that both have the expected error:
record type conflict, cannot update endpoint 'foo.example.com' with record type 'CNAME' when endpoint already exists with record type 'A'
Note: Since this test will run in the kuadrant operator using a dns operator with default configurations for default and validation re-queue times it might not be possible to check much else without it taking too long.
Depends on https://github.com/Kuadrant/kuadrant-operator/issues/601