diff --git a/client/client_test.go b/client/client_test.go index 2252360..0b76002 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -992,7 +992,15 @@ func testDisplayTable(t *testing.T, tester shellTester) { // Query and check the 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) { diff --git a/client/lib/goldens/testControlR-Search b/client/lib/goldens/testControlR-Search index 486c4cc..386e22f 100644 --- a/client/lib/goldens/testControlR-Search +++ b/client/lib/goldens/testControlR-Search @@ -1,4 +1,4 @@ -Search Query: > echo +caSearch Query: > echo ┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Hostname CWD Timestamp Runtime Exit Code Command │ diff --git a/client/lib/goldens/testDisplayTable-customColumns b/client/lib/goldens/testDisplayTable-customColumns new file mode 100644 index 0000000..4e71f2d --- /dev/null +++ b/client/lib/goldens/testDisplayTable-customColumns @@ -0,0 +1,4 @@ +Hostname Command +Davids-MacBook-Air.local hishtory query table +localhost table_cmd2 +localhost table_cmd1 diff --git a/client/lib/goldens/testDisplayTable b/client/lib/goldens/testDisplayTable-defaultColumns similarity index 100% rename from client/lib/goldens/testDisplayTable rename to client/lib/goldens/testDisplayTable-defaultColumns