-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Extend validation pattern of allowedSourceRanges to allow for IPv6 ranges #2985
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
base: master
Are you sure you want to change the base?
Conversation
…nges Signed-off-by: Andreas Palm <ap@ewsp.de>
|
Cannot start a pipeline due to: Click on pipeline status check Details link below for more information. |
|
I'm not sure if the current e2e setup allows for testing this pattern in a meaningful way, but it would be good to have a test that shows this works for IPv6 and IPv4 as it's hard to reason about such a huge regex. If we can't do it as part of e2e, then at least let's add a unit test which shows the regex works for some cases of IPv4 and IPv6 ranges. |
|
Besides that I have manually tested this regex against some valid and invalid IPv4 and IPv6 addresses to, it would of course be very beneficial to have some sort of automated testing for this. Unfortunately I am not a "Go" expert and not really sure where I should add those tests in this quite large project. Would you mind giving me a hint where to start? |
|
The only place the pattern is defined in go is in For e2e test, even better, it would be something like adding a test case similar to this one: postgres-operator/e2e/tests/test_e2e.py Lines 867 to 919 in add9912
allowedSourceRanges and check that it succeeds on a valid IPv6/IPv4 and fails on an invalid one. I can't 100% reason if this works in the e2e environment but I believe it does.
|
first part of #2787