Skip to content

Commit

Permalink
Fix lint in integration/client
Browse files Browse the repository at this point in the history
Signed-off-by: Derek McGowan <[email protected]>
  • Loading branch information
dmcgowan committed Oct 28, 2023
1 parent ddd73ad commit abfc8be
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ issues:
- path: 'archive[\\/]tarheader[\\/]'
# conversion is necessary on Linux, unnecessary on macOS
text: "unnecessary conversion"
- path: 'integration[\\/]client'
text: "dot-imports:"
- linters:
- revive
text: "if-return"
Expand Down Expand Up @@ -63,6 +65,8 @@ linters-settings:
- G306
- G402
- G404
nolintlint:
allow-unused: true

run:
timeout: 8m
Expand Down
1 change: 1 addition & 0 deletions integration/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const (
testNamespace = "testing"
)

//nolint:unused // some variables used in fuzz but not all platforms
var (
address string
ctrdStdioFilePath string
Expand Down
1 change: 1 addition & 0 deletions integration/client/client_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package client

//nolint:unused // some variables used for fuzz
const (
defaultRoot = "/var/lib/containerd-test"
defaultState = "/run/containerd-test"
Expand Down
1 change: 1 addition & 0 deletions integration/client/client_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
_ "github.com/Microsoft/hcsshim/test/functional/manifest" // For rsrc_amd64.syso
)

//nolint:unused // some variables used for fuzz
const (
defaultAddress = `\\.\pipe\containerd-containerd-test`
)
Expand Down
6 changes: 0 additions & 6 deletions integration/client/restart_monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import (
exec "golang.org/x/sys/execabs"
)

//nolint:unused // Ignore on non-Linux
func newDaemonWithConfig(t *testing.T, configTOML string) (*Client, *daemon, func()) {
if testing.Short() {
t.Skip()
Expand Down Expand Up @@ -263,11 +262,6 @@ func testRestartMonitorPausedTaskWithAlways(t *testing.T, client *Client, interv
t.Skip("Pause task is not supported on Windows")
}

const (
epsilon = 1 * time.Second
count = 20
)

var (
ctx, cancel = testContext(t)
id = strings.ReplaceAll(t.Name(), "/", "_")
Expand Down

0 comments on commit abfc8be

Please sign in to comment.