Fix lint in integration/client

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan 2023-10-27 21:37:44 -07:00
parent ddd73ad300
commit abfc8be530
No known key found for this signature in database
GPG Key ID: F58C5D0A4405ACDB
5 changed files with 7 additions and 6 deletions

View File

@ -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"
@ -63,6 +65,8 @@ linters-settings:
- G306
- G402
- G404
nolintlint:
allow-unused: true
run:
timeout: 8m

View File

@ -33,6 +33,7 @@ const (
testNamespace = "testing"
)
//nolint:unused // some variables used in fuzz but not all platforms
var (
address string
ctrdStdioFilePath string

View File

@ -18,6 +18,7 @@
package client
//nolint:unused // some variables used for fuzz
const (
defaultRoot = "/var/lib/containerd-test"
defaultState = "/run/containerd-test"

View File

@ -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`
)

View File

@ -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()
@ -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(), "/", "_")