Copilot commented on code in PR #12764:
URL: https://github.com/apache/cloudstack/pull/12764#discussion_r2910581698


##########
utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java:
##########
@@ -131,6 +131,7 @@ public void testIsValidS2SVpnPolicy() {
         assertTrue(NetUtils.isValidS2SVpnPolicy("ike", "3des-md5;modp1024"));
         assertTrue(NetUtils.isValidS2SVpnPolicy("ike", 
"3des-sha1;modp3072,aes128-sha1;modp1536"));
         assertTrue(NetUtils.isValidS2SVpnPolicy("ike", 
"3des-sha256;modp3072,aes128-sha512;modp1536"));
+        assertTrue(NetUtils.isValidS2SVpnPolicy("ike", 
"aes256;modp1024s160,modp2048s224,modp2048s256,curve25519"));

Review Comment:
   This test data looks structurally inconsistent with the other IKE policy 
examples in this test (which use `encryption-hash;group` per comma-separated 
proposal). Here, only the first proposal has `aes256;...` (missing hash), and 
the remaining items are just bare group names—likely causing the test to 
pass/fail for the wrong reason (or fail once parsing is tightened). Suggest 
rewriting this into properly formed comma-separated proposals (each including 
encryption + hash + group) and adding a focused assertion specifically for 
`curve25519` acceptance.
   ```suggestion
           assertTrue(NetUtils.isValidS2SVpnPolicy("ike", 
"aes256-sha1;modp1024s160,aes256-sha1;modp2048s224,aes256-sha1;modp2048s256,aes256-sha1;curve25519"));
           assertTrue(NetUtils.isValidS2SVpnPolicy("ike", 
"aes256-sha1;curve25519"));
   ```



-- 
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]

Reply via email to