Move up the hishtory disable so as to avoid recording the query

This commit is contained in:
David Dworken 2022-10-29 18:34:16 -07:00
parent 51096276b6
commit 6ad60f4e58
6 changed files with 26 additions and 31 deletions

View File

@ -998,11 +998,11 @@ func testDisplayTable(t *testing.T, tester shellTester) {
manuallySubmitHistoryEntry(t, userSecret, entry2) manuallySubmitHistoryEntry(t, userSecret, entry2)
// Query and check the table // Query and check the table
tester.RunInteractiveShell(t, ` hishtory disable`)
out := hishtoryQuery(t, tester, "table") out := hishtoryQuery(t, tester, "table")
compareGoldens(t, out, "testDisplayTable-defaultColumns") compareGoldens(t, out, "testDisplayTable-defaultColumns")
// Adjust the columns that should be displayed // Adjust the columns that should be displayed
tester.RunInteractiveShell(t, ` hishtory disable`)
tester.RunInteractiveShell(t, `hishtory config-set displayed-columns Hostname Command`) tester.RunInteractiveShell(t, `hishtory config-set displayed-columns Hostname Command`)
// And check the table again // And check the table again

View File

@ -1,4 +1,3 @@
Hostname Command Hostname Command
ghaction-runner-hostname hishtory query table
localhost table_cmd2 localhost table_cmd2
localhost table_cmd1 localhost table_cmd1

View File

@ -1,4 +1,3 @@
Hostname Exit Code Command Hostname Exit Code Command
ghaction-runner-hostname 0 hishtory query table
localhost 3 table_cmd2 localhost 3 table_cmd2
localhost 2 table_cmd1 localhost 2 table_cmd1

View File

@ -1,4 +1,3 @@
Hostname Exit Code Command CWD Hostname Exit Code Command CWD
ghaction-runner-hostname 0 hishtory query table ~/code/hishtory
localhost 3 table_cmd2 ~/foo/ localhost 3 table_cmd2 ~/foo/
localhost 2 table_cmd1 /tmp/ localhost 2 table_cmd1 /tmp/

View File

@ -1,5 +1,4 @@
Hostname Exit Code Command CWD Hostname Exit Code Command CWD
ghaction-runner-hostname 0 hishtory query table ~/code/hishtory
localhost 2 while : /tmp/ localhost 2 while : /tmp/
do do
ls /table/ ls /table/

View File

@ -1,7 +1,6 @@
Hostname Exit Code Command CWD foo Hostname Exit Code Command CWD foo
ghaction-runner-hostname 0 echo table-2 / aaaaaaaaaaaaa ghaction-runner-hostname 0 echo table-2 / aaaaaaaaaaaaa
ghaction-runner-hostname 0 echo table-1 / aaaaaaaaaaaaa ghaction-runner-hostname 0 echo table-1 / aaaaaaaaaaaaa
ghaction-runner-hostname 0 hishtory query table ~/code/hishtory
localhost 2 while : /tmp/ localhost 2 while : /tmp/
do do
ls /table/ ls /table/