Copilot commented on code in PR #7059:
URL: https://github.com/apache/shenyu/pull/7059#discussion_r4032738795
##########
shenyu-kubernetes-controller/src/test/java/org/apache/shenyu/k8s/parser/DubboIngressParserTest.java:
##########
@@ -152,4 +159,36 @@ public void testEmptyProtocolAnnotation() {
List<DubboUpstream> upstreams = assertDoesNotThrow(() ->
parseAndGetUpstreams(annotations));
assertNotNull(upstreams);
}
+
+
+ @Test
+ public void shouldIgnorePathWithNullBackend() {
+ ShenyuMemoryConfig config = Assertions.assertDoesNotThrow(() ->
createParser().parse(
+ createIngress(null, Collections.emptyMap(), false), null));
Review Comment:
This does not exercise the null-annotations path: with `withBackend=false`,
`parseUpstream` returns at the new backend guard before evaluating
`annotations`. Keep this regression for the null backend, but add a separate
valid-backend ingress with `annotations == null` so the annotation guard is
actually covered.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]