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
Add tests to cover override behaviour for IngressRoute and HTTPProxy #1981
Add tests to cover override behaviour for IngressRoute and HTTPProxy #1981
Conversation
4db3c02
to
675d381
Compare
After some discussion with Dave, this is missing some tests, and a feature: The ingressroute that is superseded by the HTTPProxy should have an invalid status. I'll work more on this tomorrow. |
internal/dag/builder_test.go
Outdated
@@ -5479,6 +5550,57 @@ func TestDAGInsert(t *testing.T) { | |||
}, | |||
), | |||
}, | |||
// This tests what happens when you build with an ingressroute and a HTTPProxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: try the imperative mood
// Assert that a route in IngressRoute takes precedence over Ingress.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, good idea, that's much more concise. I'll change this, and then merge.
pls ignore my previous reply, wrong window |
Fixes projectcontour#1949 Issue projectcontour#1949 is about ensuring that HTTPProxy objects will override IngressRoute ones when they match on {FQDN, path} tuple. Turns out this is already the case, this PR adds tests to assert this behaviour. Signed-off-by: Nick Young <ynick@vmware.com>
675d381
to
4129db5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@youngnick ping, this Is approved, are you ok to land it? |
Sorry, yes, will land it now. |
Fixes #1949
Issue #1949 is about ensuring that HTTPProxy objects will override IngressRoute
ones when they match on {FQDN, path} tuple. Turns out this is already the case,
this PR adds tests to assert this behaviour.
The tests have an Ingress, IngressRoute, and HTTPProxy that are identical aside from the service where the traffic is routed to, and assert that the override behaviour holds based on which service ends up chosen.
Note that routes that are not exactly the same (on FQDN, path tuple), will just be additive, no matter where they come from. This is why the cert-manager ingress-shim thing works.
Signed-off-by: Nick Young ynick@vmware.com