From 98c222239e4f807ea668fc16713926b476463a1d Mon Sep 17 00:00:00 2001 From: fate-grand-order Date: Tue, 21 Feb 2017 16:53:29 +0800 Subject: [PATCH] use t.Fatal() to output the err message where the values used for formatting text does not appear to contain a placeholder Signed-off-by: Helen Xie --- command/container/opts_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/command/container/opts_test.go b/command/container/opts_test.go index d0655069e9..725c9beb42 100644 --- a/command/container/opts_test.go +++ b/command/container/opts_test.go @@ -28,7 +28,7 @@ func TestValidateAttach(t *testing.T) { "STDERR", } if _, err := validateAttach("invalid"); err == nil { - t.Fatalf("Expected error with [valid streams are STDIN, STDOUT and STDERR], got nothing") + t.Fatal("Expected error with [valid streams are STDIN, STDOUT and STDERR], got nothing") } for _, attach := range valid { @@ -96,28 +96,28 @@ func TestParseRunAttach(t *testing.T) { } if _, _, err := parsetest(t, "-a"); err == nil { - t.Fatalf("Error parsing attach flags, `-a` should be an error but is not") + t.Fatal("Error parsing attach flags, `-a` should be an error but is not") } if _, _, err := parsetest(t, "-a invalid"); err == nil { - t.Fatalf("Error parsing attach flags, `-a invalid` should be an error but is not") + t.Fatal("Error parsing attach flags, `-a invalid` should be an error but is not") } if _, _, err := parsetest(t, "-a invalid -a stdout"); err == nil { - t.Fatalf("Error parsing attach flags, `-a stdout -a invalid` should be an error but is not") + t.Fatal("Error parsing attach flags, `-a stdout -a invalid` should be an error but is not") } if _, _, err := parsetest(t, "-a stdout -a stderr -d"); err == nil { - t.Fatalf("Error parsing attach flags, `-a stdout -a stderr -d` should be an error but is not") + t.Fatal("Error parsing attach flags, `-a stdout -a stderr -d` should be an error but is not") } if _, _, err := parsetest(t, "-a stdin -d"); err == nil { - t.Fatalf("Error parsing attach flags, `-a stdin -d` should be an error but is not") + t.Fatal("Error parsing attach flags, `-a stdin -d` should be an error but is not") } if _, _, err := parsetest(t, "-a stdout -d"); err == nil { - t.Fatalf("Error parsing attach flags, `-a stdout -d` should be an error but is not") + t.Fatal("Error parsing attach flags, `-a stdout -d` should be an error but is not") } if _, _, err := parsetest(t, "-a stderr -d"); err == nil { - t.Fatalf("Error parsing attach flags, `-a stderr -d` should be an error but is not") + t.Fatal("Error parsing attach flags, `-a stderr -d` should be an error but is not") } if _, _, err := parsetest(t, "-d --rm"); err == nil { - t.Fatalf("Error parsing attach flags, `-d --rm` should be an error but is not") + t.Fatal("Error parsing attach flags, `-d --rm` should be an error but is not") } }