From 3e2373d76ec09bf5d22e093f9fe2bdea809c7ac1 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 13 Nov 2022 06:42:37 -0800 Subject: [PATCH] More fixes for github action failures + add link to where to file a bug --- client/client_test.go | 5 +---- client/lib/goldens/testIntegrationWithNewDevice-tablezsh | 3 --- client/lib/lib.go | 4 ++-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 3c8192f..689d7a5 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -2282,12 +2282,9 @@ func testMultipleUsers(t *testing.T, tester shellTester) { // Check that the right commands were recorded for user2 for i, d := range []device{u2d1, u2d2, u2d3} { switchToDevice(&devices, d) - out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export`) + out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export -export -pipefail`) testutils.Check(t, err) expectedOutput := "echo u2d1\necho u2d2\necho u2d3\necho u1d1-b\necho u1d1-c\necho u2d3-b\necho u2d3-c\n" - for j := 0; j < i; j++ { - expectedOutput += "hishtory export\n" - } if diff := cmp.Diff(expectedOutput, out); diff != "" { t.Fatalf("hishtory export mismatch (-expected +got):\n%s\nout=%#v", diff, out) } diff --git a/client/lib/goldens/testIntegrationWithNewDevice-tablezsh b/client/lib/goldens/testIntegrationWithNewDevice-tablezsh index 8d29b7e..edd243d 100644 --- a/client/lib/goldens/testIntegrationWithNewDevice-tablezsh +++ b/client/lib/goldens/testIntegrationWithNewDevice-tablezsh @@ -17,8 +17,5 @@ ghaction-runner-hostname 0 echo thisisrecorded ghaction-runner-hostname 0 hishtory enable ghaction-runner-hostname 0 echo bar ghaction-runner-hostname 0 echo foo -ghaction-runner-hostname 1 ls /foo -ghaction-runner-hostname 1 ls /bar -ghaction-runner-hostname 1 ls /a ghaction-runner-hostname 0 hishtory query ghaction-runner-hostname 0 hishtory status diff --git a/client/lib/lib.go b/client/lib/lib.go index 6fd3019..0d79fbe 100644 --- a/client/lib/lib.go +++ b/client/lib/lib.go @@ -311,11 +311,11 @@ func parseCrossPlatformInt(data string) (int64, error) { func getLastCommand(history string) (string, error) { split := strings.SplitN(strings.TrimSpace(history), " ", 2) if len(split) <= 1 { - return "", fmt.Errorf("got unexpected bash history line: %#v, please open a bug", history) + return "", fmt.Errorf("got unexpected bash history line: %#v, please open a bug at github.com/ddworken/hishtory", history) } split = strings.SplitN(split[1], " ", 2) if len(split) <= 1 { - return "", fmt.Errorf("got unexpected bash history line: %#v, please open a bug", history) + return "", fmt.Errorf("got unexpected bash history line: %#v, please open a bug at github.com/ddworken/hishtory", history) } return split[1], nil }