Make the timestamp command super long to force table sizing to be consistent + add an explicit HISHTORY_SKIP_INIT_IMPORT in the tests

This commit is contained in:
David Dworken 2022-11-12 07:50:06 -08:00
parent 5cd403a22b
commit 1792e694b0
No known key found for this signature in database
4 changed files with 30 additions and 59 deletions

View File

@ -230,7 +230,8 @@ func testIntegrationWithNewDevice(t *testing.T, tester shellTester) {
}
// Set the secret key to the previous secret key
out, err := tester.RunInteractiveShellRelaxed(t, `yes | hishtory init `+userSecret)
out, err := tester.RunInteractiveShellRelaxed(t, ` export HISHTORY_SKIP_INIT_IMPORT=1
yes | hishtory init `+userSecret)
testutils.Check(t, err)
if !strings.Contains(out, "Setting secret hishtory key to "+userSecret) {
t.Fatalf("Failed to re-init with the user secret: %v", out)
@ -2119,7 +2120,7 @@ func TestTimestampFormat(t *testing.T) {
if err != nil {
t.Fatalf("failed to load timezone: %v", err)
}
entry1 := testutils.MakeFakeHistoryEntry("table_cmd1")
entry1 := testutils.MakeFakeHistoryEntry("table_cmd1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
entry1.StartTime = time.Unix(1650096186, 0).In(tmz)
entry1.EndTime = time.Unix(1650096190, 0).In(tmz)
manuallySubmitHistoryEntry(t, userSecret, entry1)

View File

@ -1,3 +1,3 @@
Hostname CWD Timestamp Runtime Exit Code Command
localhost ~/foo/ 2022/Apr/16 01:03 24s 3 table_cmd2
localhost /tmp/ 2022/Apr/16 01:03 4s 2 table_cmd1
Hostname CWD Timestamp Runtime Exit Code Command
localhost ~/foo/ 2022/Apr/16 01:03 24s 3 table_cmd2
localhost /tmp/ 2022/Apr/16 01:03 4s 2 table_cmd1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

View File

@ -4,27 +4,27 @@
Search Query: > -pipefail -tablesizing
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Hostname CWD Timestamp Runtime Exit Code Command
│────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
│ localhost ~/foo/ 2022/Apr/16 01:03 24s 3 table_cmd2
│ localhost /tmp/ 2022/Apr/16 01:03 4s 2 table_cmd1
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ Hostname CWD Timestamp Runtime Exit Code Command
│───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ localhost ~/foo/ 2022/Apr/16 01:03 24s 3 table_cmd2
│ localhost /tmp/ 2022/Apr/16 01:03 4s 2 table_cmd1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa…
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

View File

@ -1,30 +0,0 @@
-pipefail -tablesizing
Search Query: > -pipefail -tablesizing
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Hostname CWD Timestamp Runtime Exit Code Command │
│─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
│ localhost ~/foo/ 2022/Apr/16 01:03 24s 3 table_cmd2 │
│ localhost /tmp/ 2022/Apr/16 01:03 4s 2 table_cmd1 │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘