mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-23 00:34:27 +01:00
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
This commit is contained in:
parent
d0712f84c6
commit
bed3fd3eb4
@ -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`)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user