-
Notifications
You must be signed in to change notification settings - Fork 47
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
cleanup: Fix various issues found by code inspection #1278
base: main
Are you sure you want to change the base?
Conversation
tests/crypto_policy_test.go
Outdated
@@ -204,7 +204,7 @@ func getCaCertificate() []byte { | |||
func tryToAccessEndpoint(pod core.Pod, serviceName string, subpath string, port uint16, tlsConfig clientTLSOptions, insecure bool) (attemptedUrl string, err error) { | |||
conn, err := portForwarder.Connect(&pod, port) | |||
Expect(err).ToNot(HaveOccurred()) | |||
defer conn.Close() | |||
defer Expect(conn.Close()).To(Succeed()) |
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.
Will it run if another Expect fails?
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.
Yes, it will work. A panic can happen during panicking. They will just wrap around each other.
https://go.dev/play/p/Eq5sdpNkDl
c3d1c4b
to
45c1ccc
Compare
In multiple PRs we have problem with the |
/retest |
1 similar comment
/retest |
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.
/approve
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 0xFelix 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 |
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.
/lgtm
/hold
@akrejcir Do you want to hold it until you get a response from @machadovilaca to your question about an unused function?
45c1ccc
to
c7b19d4
Compare
/unhold |
/retest |
/lgtm |
Signed-off-by: Andrej Krejcir <[email protected]>
Signed-off-by: Andrej Krejcir <[email protected]>
Signed-off-by: Andrej Krejcir <[email protected]>
Signed-off-by: Andrej Krejcir <[email protected]>
c7b19d4
to
d41c688
Compare
/lgtm |
The failures were probably not flakes, but caused by this PR. I'm looking into it. |
There are tests that check that invalid TLS connections are rejected. When a connection is rejected, the client closes it. This caused an error when the test code tried the close the connection again. This PR moves the creation of the connection to the DialContext function. It is now managed by the HTTP client. Signed-off-by: Andrej Krejcir <[email protected]>
New changes are detected. LGTM label has been removed. |
|
@akrejcir: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What this PR does / why we need it:
Fixed:
Release note: