mirror of https://github.com/docker/cli.git
cli/command/container: suppress dogsled warnings
``` cli/command/container/opts_test.go:68:2: declaration has 3 blank identifiers (dogsled) _, _, _, err := parseRun(strings.Split(args+" ubuntu bash", " ")) ^ cli/command/container/opts_test.go:542:2: declaration has 3 blank identifiers (dogsled) _, _, _, err = parseRun([]string{"--uts=container:", "img", "cmd"}) ^ cli/command/container/opts_test.go:603:2: declaration has 3 blank identifiers (dogsled) _, _, _, err := parseRun([]string{"--rm", "--restart=always", "img", "cmd"}) ^ ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
dd4d216afd
commit
79dc83e78b
|
@ -65,7 +65,7 @@ func setupRunFlags() (*pflag.FlagSet, *containerOptions) {
|
|||
}
|
||||
|
||||
func parseMustError(t *testing.T, args string) {
|
||||
_, _, _, err := parseRun(strings.Split(args+" ubuntu bash", " "))
|
||||
_, _, _, err := parseRun(strings.Split(args+" ubuntu bash", " ")) //nolint:dogsled
|
||||
assert.ErrorContains(t, err, "", args)
|
||||
}
|
||||
|
||||
|
@ -539,7 +539,7 @@ func TestParseModes(t *testing.T) {
|
|||
}
|
||||
|
||||
// uts ko
|
||||
_, _, _, err = parseRun([]string{"--uts=container:", "img", "cmd"})
|
||||
_, _, _, err = parseRun([]string{"--uts=container:", "img", "cmd"}) //nolint:dogsled
|
||||
assert.ErrorContains(t, err, "--uts: invalid UTS mode")
|
||||
|
||||
// uts ok
|
||||
|
@ -600,7 +600,7 @@ func TestParseRestartPolicy(t *testing.T) {
|
|||
|
||||
func TestParseRestartPolicyAutoRemove(t *testing.T) {
|
||||
expected := "Conflicting options: --restart and --rm"
|
||||
_, _, _, err := parseRun([]string{"--rm", "--restart=always", "img", "cmd"})
|
||||
_, _, _, err := parseRun([]string{"--rm", "--restart=always", "img", "cmd"}) //nolint:dogsled
|
||||
if err == nil || err.Error() != expected {
|
||||
t.Fatalf("Expected error %v, but got none", expected)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue