From 40caf8dac7b7d6d0eb4d0f15868fae24f3134a37 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 19 Nov 2023 02:21:43 -0800 Subject: [PATCH] More test fixes --- client/client_test.go | 3 ++- client/lib/goldens/TestFish-table | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 175b327..5c22b96 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -177,6 +177,7 @@ yes | hishtory init `+userSecret) for _, item := range expected { require.Contains(t, out, item, "output is missing expected item") if strings.Count(out, item) != 1 { + fmt.Println("TODO: Debugging: out=" + out) t.Fatalf("output has %#v in it multiple times! out=%#v", item, out) } } @@ -478,7 +479,7 @@ hishtory disable`) manuallySubmitHistoryEntry(t, userSecret, entry) out = hishtoryQuery(t, tester, `-echo -install -pipefail`) require.NotContains(t, out, "echo") - if strings.Count(out, "\n") != 4 { + if strings.Count(out, "\n") != 6 { t.Fatalf("hishtory query has the wrong number of lines=%d, out=%#v", strings.Count(out, "\n"), out) } diff --git a/client/lib/goldens/TestFish-table b/client/lib/goldens/TestFish-table index fa4eaed..168bf19 100644 --- a/client/lib/goldens/TestFish-table +++ b/client/lib/goldens/TestFish-table @@ -1,8 +1,9 @@ CWD Hostname Exit Code Command -/ ghaction-runner-hostname 0 hishtory config-set displayed-columns CWD Hostname 'Exit Code' Command -/ ghaction-runner-hostname 0 fish -/ ghaction-runner-hostname 0 echo foo -/ ghaction-runner-hostname 0 ls /tmp/ & -/ ghaction-runner-hostname 0 echo "foo" -/ ghaction-runner-hostname 0 echo bar -/ ghaction-runner-hostname 0 echo foo + / ghaction-runner-hostname 0 hishtory config-set displayed-columns CWD Hostname 'Exit Code' Command + / ghaction-runner-hostname 0 exit + / ghaction-runner-hostname 0 echo foo + / ghaction-runner-hostname 0 fish + / ghaction-runner-hostname 0 ls /tmp/ & + / ghaction-runner-hostname 0 echo "foo" + / ghaction-runner-hostname 0 echo bar + / ghaction-runner-hostname 0 echo foo