-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove all IPV6 listeners in ingress resources with -disable-ipv6 command line #3139
Remove all IPV6 listeners in ingress resources with -disable-ipv6 command line #3139
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3139 +/- ##
=======================================
Coverage 52.54% 52.55%
=======================================
Files 58 58
Lines 16069 16070 +1
=======================================
+ Hits 8444 8445 +1
Misses 7349 7349
Partials 276 276
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
internal/configs/ingress_test.go
Outdated
|
||
result, warnings := generateNginxCfg(&cafeIngressEx, nil, nil, false, configParams, isPlus, false, &StaticConfigParams{DisableIPV6: true}, false) | ||
|
||
if diff := cmp.Diff(expected, result); diff != "" { |
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.
How about calculating diff between expected and result only after it is discovered that the values are not equal (aka test fails)?
if !cmp.Equal(expected, result) {
t.Errorf("generateNginxCfg() returned unexpected result (-want +got):\n%s", cmp.Diff(expected, result))
}
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.
Sounds good! Updated in the latest commit.
7b304d5
to
db33331
Compare
@pytest.mark.parametrize( | ||
"ingress_controller", | ||
[ | ||
pytest.param({"extra_args": ["-disable-ipv6"]}, id="one-additional-cli-args"), |
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.
What does the id="one-additional-cli-args"
option do? I haven't seen that before
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.
This is just the test ID of the parametrize
values in pytest. Since I only have one set of values, I have removed the id and let pytest generate it.
ff2d037
to
66899e0
Compare
…ommandline-argument-used
…ommandline-argument-used
…ommandline-argument-used
…mand line (#3139) * Remove ipv6 listeners in ingress upstream with command line argument Co-authored-by: Venktesh <[email protected]> (cherry picked from commit 4e6caf0)
* Remove all IPV6 listeners in ingress resources with -disable-ipv6 command line (#3139) * Remove ipv6 listeners in ingress upstream with command line argument Co-authored-by: Venktesh <[email protected]> (cherry picked from commit 4e6caf0) * Fix typo in Action.Proxy.ResponseHeaders (#3157) Corrected bool to []string in Action.Proxy.ResponseHeaders section (cherry picked from commit 4824823) Co-authored-by: Ciara Stacke <[email protected]> Co-authored-by: tomasohaodha <[email protected]>
…mand line (nginxinc#3139) * Remove ipv6 listeners in ingress upstream with command line argument Co-authored-by: Venktesh <[email protected]>
Proposed changes
When
-disable-ipv6
command line argument is used, remove all IPV6 listeners in upstream deployed with ingress.Closes #3138
Checklist
Before creating a PR, run through this checklist and mark each as complete.