-
Notifications
You must be signed in to change notification settings - Fork 588
simplify BackendTLSPolicy test infrastructure and remove unnecessary code #4016
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
simplify BackendTLSPolicy test infrastructure and remove unnecessary code #4016
Conversation
In case that #3983 is merged before this PR, the changes here will also need to be applied to the |
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.
Thanks for cleaning this up! One question impacting SAN tests that are in review
@shaneutt, it would be great if we could get this merged before the code freeze. |
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.
Thanks for the PR, looks good now :)
/lgtm |
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func Test_generateCACert(t *testing.T) { |
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.
why remove the test? we still have the generateCACert helper function right? I mean, was this test failing or is this test not being useful?
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.
It was only for testing that the CA certificate contained the specified hostnames, which does not make sense.
…code Signed-off-by: Norwin Schnyder <[email protected]>
37defa3
to
89f8855
Compare
89f8855
to
043583d
Compare
043583d
to
9e4cf2a
Compare
@kl52752 sure, I verified the refactoring by running the |
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.
Thank you for the refactoring :)
/lgtm |
Tested locally (removing the /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kl52752, shaneutt, snorwin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind test
/area conformance-machinery
What this PR does / why we need it:
This PR simplifies the test infrastructure for BackendTLSPolicy by reusing the existing
backend-tls
Deployment instead of creating a separate backend. In addition, it fixes the CA certificate creation process as a CA certificates typically do not contain hostnames and following best practices, the CA certificate private key is now omitted from the ConfigMap.The refactoring was validated by re-running the BackendTLSPolicy tests against Envoy Gateway and Airlock Microgateway, all of which passed successfully.
Which issue(s) this PR fixes:
Fixes #3934
Does this PR introduce a user-facing change?: