mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-03 17:05:56 +02:00
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:
parent
5cd403a22b
commit
1792e694b0
@ -230,7 +230,8 @@ func testIntegrationWithNewDevice(t *testing.T, tester shellTester) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the secret key to the previous secret key
|
// 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)
|
testutils.Check(t, err)
|
||||||
if !strings.Contains(out, "Setting secret hishtory key to "+userSecret) {
|
if !strings.Contains(out, "Setting secret hishtory key to "+userSecret) {
|
||||||
t.Fatalf("Failed to re-init with the user secret: %v", out)
|
t.Fatalf("Failed to re-init with the user secret: %v", out)
|
||||||
@ -2119,7 +2120,7 @@ func TestTimestampFormat(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to load timezone: %v", err)
|
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.StartTime = time.Unix(1650096186, 0).In(tmz)
|
||||||
entry1.EndTime = time.Unix(1650096190, 0).In(tmz)
|
entry1.EndTime = time.Unix(1650096190, 0).In(tmz)
|
||||||
manuallySubmitHistoryEntry(t, userSecret, entry1)
|
manuallySubmitHistoryEntry(t, userSecret, entry1)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Hostname CWD Timestamp Runtime Exit Code Command
|
Hostname CWD Timestamp Runtime Exit Code Command
|
||||||
localhost ~/foo/ 2022/Apr/16 01:03 24s 3 table_cmd2
|
localhost ~/foo/ 2022/Apr/16 01:03 24s 3 table_cmd2
|
||||||
localhost /tmp/ 2022/Apr/16 01:03 4s 2 table_cmd1
|
localhost /tmp/ 2022/Apr/16 01:03 4s 2 table_cmd1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
@ -4,27 +4,27 @@
|
|||||||
|
|
||||||
Search Query: > -pipefail -tablesizing
|
Search Query: > -pipefail -tablesizing
|
||||||
|
|
||||||
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
│ Hostname CWD Timestamp Runtime Exit Code Command │
|
│ Hostname CWD Timestamp Runtime Exit Code Command │
|
||||||
│────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
|
│───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
|
||||||
│ localhost ~/foo/ 2022/Apr/16 01:03 24s 3 table_cmd2 │
|
│ localhost ~/foo/ 2022/Apr/16 01:03 24s 3 table_cmd2 │
|
||||||
│ localhost /tmp/ 2022/Apr/16 01:03 4s 2 table_cmd1 │
|
│ localhost /tmp/ 2022/Apr/16 01:03 4s 2 table_cmd1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa… │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
@ -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 │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
Loading…
x
Reference in New Issue
Block a user