mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-09 23:17:55 +02:00
Revert "Add preliminary support for persisting pre-saved history entries remotely"
This reverts commit ff98a7907c
. That commit is incomplete since it doesn't include support for the continous deletion of pre-saved history entries as soon as they
finish running. Support for this will require a good bit more work/thought, so reverting for and keeping this code in the git history.
This commit is contained in:
@ -2364,24 +2364,15 @@ func testPresaving(t *testing.T, tester shellTester) {
|
||||
out = tester.RunInteractiveShell(t, ` hishtory query sleep 13371337 -export -tquery`)
|
||||
testutils.CompareGoldens(t, out, "testPresaving-query")
|
||||
|
||||
// Create a new device, and confirm it shows up there too
|
||||
restoreDevice1 := testutils.BackupAndRestoreWithId(t, "device1")
|
||||
installHishtory(t, tester, userSecret)
|
||||
tester.RunInteractiveShell(t, ` hishtory config-set displayed-columns CWD Runtime Command`)
|
||||
out = tester.RunInteractiveShell(t, ` hishtory query sleep 13371337 -export -tquery`)
|
||||
testutils.CompareGoldens(t, out, "testPresaving-query")
|
||||
|
||||
// And then redact it from device2
|
||||
tester.RunInteractiveShell(t, ` HISHTORY_REDACT_FORCE=true hishtory redact sleep 13371337`)
|
||||
|
||||
// And confirm it was redacted
|
||||
out = tester.RunInteractiveShell(t, ` hishtory export sleep -export`)
|
||||
require.Equal(t, "", out)
|
||||
|
||||
// Then go back to device1 and confirm it was redacted there too
|
||||
restoreDevice1()
|
||||
out = tester.RunInteractiveShell(t, ` hishtory export sleep -export`)
|
||||
require.Equal(t, "", out)
|
||||
// And the same for tquery
|
||||
// out = captureTerminalOutputWithComplexCommands(t, tester,
|
||||
// []TmuxCommand{
|
||||
// {Keys: "hishtory SPACE tquery ENTER", ExtraDelay: 2.0},
|
||||
// {Keys: "sleep SPACE 13371337 SPACE -export SPACE -tquery"}})
|
||||
// out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
||||
// testutils.CompareGoldens(t, out, "testPresaving-tquery")
|
||||
//
|
||||
// TODO: Debug why ^ is failing with flaky differences on Github Actions, see https://pastebin.com/BUa1btnh
|
||||
}
|
||||
|
||||
func testUninstall(t *testing.T, tester shellTester) {
|
||||
|
Reference in New Issue
Block a user