mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-26 18:23:27 +01:00
Basic test for custom columns
This commit is contained in:
parent
fb258627df
commit
bed19f5316
@ -992,7 +992,15 @@ func testDisplayTable(t *testing.T, tester shellTester) {
|
|||||||
|
|
||||||
// Query and check the table
|
// Query and check the table
|
||||||
out := hishtoryQuery(t, tester, "table")
|
out := hishtoryQuery(t, tester, "table")
|
||||||
compareGoldens(t, out, "testDisplayTable")
|
compareGoldens(t, out, "testDisplayTable-defaultColumns")
|
||||||
|
|
||||||
|
// Adjust the columns that should be displayed
|
||||||
|
tester.RunInteractiveShell(t, ` hishtory disable`)
|
||||||
|
tester.RunInteractiveShell(t, `hishtory config-set displayed-columns Hostname Command`)
|
||||||
|
|
||||||
|
// And check the table again
|
||||||
|
out = hishtoryQuery(t, tester, "table")
|
||||||
|
compareGoldens(t, out, "testDisplayTable-customColumns")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testRequestAndReceiveDbDump(t *testing.T, tester shellTester) {
|
func testRequestAndReceiveDbDump(t *testing.T, tester shellTester) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Search Query: > echo
|
caSearch Query: > echo
|
||||||
|
|
||||||
┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
│ Hostname CWD Timestamp Runtime Exit Code Command │
|
│ Hostname CWD Timestamp Runtime Exit Code Command │
|
||||||
|
4
client/lib/goldens/testDisplayTable-customColumns
Normal file
4
client/lib/goldens/testDisplayTable-customColumns
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Hostname Command
|
||||||
|
Davids-MacBook-Air.local hishtory query table
|
||||||
|
localhost table_cmd2
|
||||||
|
localhost table_cmd1
|
Loading…
Reference in New Issue
Block a user