From 1ce469f1fdc1eb3975c512d3aa29d1c1618ebde3 Mon Sep 17 00:00:00 2001 From: Phillip Wittrock Date: Thu, 13 Feb 2020 17:18:46 -0800 Subject: [PATCH] stop printing expected error message in fmt command test --- cmd/config/internal/commands/fmt_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/config/internal/commands/fmt_test.go b/cmd/config/internal/commands/fmt_test.go index bc7e5df56..c373a5ca7 100644 --- a/cmd/config/internal/commands/fmt_test.go +++ b/cmd/config/internal/commands/fmt_test.go @@ -143,6 +143,8 @@ func TestCmd_failFiles(t *testing.T) { // fmt the files r := commands.GetFmtRunner("") r.Command.SetArgs([]string{"notrealfile"}) + r.Command.SilenceUsage = true + r.Command.SilenceErrors = true err := r.Command.Execute() assert.EqualError(t, err, "lstat notrealfile: no such file or directory") }