From 79dc83e78be346103189aa66cde0ec2e6f64a70e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 14:04:33 +0100 Subject: [PATCH] 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 --- cli/command/container/opts_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/command/container/opts_test.go b/cli/command/container/opts_test.go index a64b7c6a30..e8c71e2388 100644 --- a/cli/command/container/opts_test.go +++ b/cli/command/container/opts_test.go @@ -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) }