From 61a7435fb7e6feb76e652f376530a09119345f50 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Tue, 26 Sep 2023 22:17:32 -0700 Subject: [PATCH] Add additional assertion to presaving test to make it a stronger test, and to help debug a test failure that only reproduces on github actions --- client/client_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/client_test.go b/client/client_test.go index bb00cbc..2899ec6 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -2117,6 +2117,13 @@ func testPresaving(t *testing.T, tester shellTester) { out = tester.RunInteractiveShell(t, ` hishtory query sleep 13371337 -export -tquery`) testutils.CompareGoldens(t, out, "testPresaving-query") + // And that all the other commands do to + out = tester.RunInteractiveShell(t, ` hishtory export -hishtory -table_sizing -pipefail`) + expectedOutput = "sleep 13371337\nls /\nsleep 0.5\n" + if diff := cmp.Diff(expectedOutput, out); diff != "" { + t.Fatalf("hishtory export mismatch (-expected +got):\n%s\nout=%#v", diff, out) + } + // And then redact it from device2 tester.RunInteractiveShell(t, ` HISHTORY_REDACT_FORCE=true hishtory redact sleep 13371337`)