-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Fix golint failures of test/e2e/apps #76132
Fix golint failures of test/e2e/apps #76132
Conversation
/priority important-soon |
/assign @mfojtik |
/assign @fejta @neolit123 |
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, added a couple of comments.
test/e2e/apps/daemon_restart.go
Outdated
ADD = "ADD" | ||
DEL = "DEL" | ||
UPDATE = "UPDATE" | ||
// ADD represents for ADD event |
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.
for
-> the
[1]
test/e2e/apps/daemon_restart.go
Outdated
UPDATE = "UPDATE" | ||
// ADD represents for ADD event | ||
ADD = "ADD" | ||
// DEL represents for DEL event |
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.
[1]
test/e2e/apps/daemon_restart.go
Outdated
ADD = "ADD" | ||
// DEL represents for DEL event | ||
DEL = "DEL" | ||
// UPDATE represents for UPDATE event |
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.
[1]
// it comes back up. It uses ssh to send a SIGTERM to the daemon. | ||
type restartDaemonConfig struct { | ||
type RestartDaemonConfig struct { |
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.
private struct with private methods should be fine.
what was the linter error here?
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 your feedback @neolit123
Because public method NewRestartConfig
returns an instance of private restartDaemonConfig
.
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 the linter error: @neolit123
daemon_restart.go:71:110: exported func NewRestartConfig returns unexported type *apps.restartDaemonConfig, which can be annoying to use
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 info.
the change seems OK.
/retest |
@@ -20,8 +20,8 @@ import ( | |||
"fmt" | |||
"time" | |||
|
|||
. "github.com/onsi/ginkgo" | |||
. "github.com/onsi/gomega" | |||
"github.com/onsi/ginkgo" |
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.
Please include the lint exception from: https://github.com/kubernetes/kubernetes/blob/master/hack/.golint_failures#L636
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 your feedback. @fejta
Now I have updated all the files in the folder test/e2e/apps
and cleaned up hack/.golint_failures
.
356b222
to
a04a15f
Compare
/retest |
a04a15f
to
03180ec
Compare
/test pull-kubernetes-kubemark-e2e-gce-big |
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
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
/approve
thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fejta, SataQiu 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 cleanup
What this PR does / why we need it:
Fix golint failures of e2e/apps/cronjob.go e2e/apps/daemon_restart.go
Which issue(s) this PR fixes:
Ref #68026
Special notes for your reviewer:
Does this PR introduce a user-facing change?: