Skip to content

Commit

Permalink
Format buildCmd test output
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Apr 29, 2020
1 parent e33a608 commit 84353d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/logs/requestor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 84353d0

Please sign in to comment.