From 84353d0cae56a469c4294a86f2e447e22ff13180 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Wed, 29 Apr 2020 09:59:26 +0100 Subject: [PATCH] Format buildCmd test output Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- pkg/logs/requestor_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/logs/requestor_test.go b/pkg/logs/requestor_test.go index 5d382c6..6f9ba7b 100644 --- a/pkg/logs/requestor_test.go +++ b/pkg/logs/requestor_test.go @@ -62,12 +62,12 @@ func Test_buildCmd(t *testing.T) { ) cmd := buildCmd(ctx, req).String() - - if !strings.Contains(cmd, "journalctl") { - t.Fatalf("expected journalctl cmd, got cmd %s", cmd) + wantCmd := "journalctl" + if !strings.Contains(cmd, wantCmd) { + t.Fatalf("cmd want: %q, got: %q", wantCmd, cmd) } if !strings.HasSuffix(cmd, expectedArgs) { - t.Fatalf("expected arg %s,\ngot cmd %s", expectedArgs, cmd) + t.Fatalf("arg want: %q\ngot: %q", expectedArgs, cmd) } }