From dc5fd19c9e43b855b3ccac4235f5206ab1c00a74 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Thu, 27 Oct 2022 21:57:09 -0700 Subject: [PATCH] Add another test for custom columns --- client/client_test.go | 6 ++++++ client/lib/goldens/testDisplayTable-customColumns-2 | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 client/lib/goldens/testDisplayTable-customColumns-2 diff --git a/client/client_test.go b/client/client_test.go index 2e442f7..e3fbc45 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1002,6 +1002,12 @@ func testDisplayTable(t *testing.T, tester shellTester) { // And check the table again out = hishtoryQuery(t, tester, "table") compareGoldens(t, out, "testDisplayTable-customColumns") + + // And again + tester.RunInteractiveShell(t, ` hishtory disable`) + tester.RunInteractiveShell(t, `hishtory config-set displayed-columns Hostname 'Exit Code' Command`) + out = hishtoryQuery(t, tester, "table") + compareGoldens(t, out, "testDisplayTable-customColumns-2") } func testRequestAndReceiveDbDump(t *testing.T, tester shellTester) { diff --git a/client/lib/goldens/testDisplayTable-customColumns-2 b/client/lib/goldens/testDisplayTable-customColumns-2 new file mode 100644 index 0000000..0468a0e --- /dev/null +++ b/client/lib/goldens/testDisplayTable-customColumns-2 @@ -0,0 +1,4 @@ +Hostname Exit Code Command +Davids-MacBook-Air.local 0 hishtory query table +localhost 3 table_cmd2 +localhost 2 table_cmd1