mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-22 13:01:33 +02:00
Attempt to fix github action only test failures
This commit is contained in:
parent
fea4bd49ec
commit
6e7822ebae
10
.github/workflows/go-test.yml
vendored
10
.github/workflows/go-test.yml
vendored
@ -33,8 +33,8 @@ jobs:
|
|||||||
sudo hostname ghaction-runner-hostname || true # Set a consistent hostname so we can run tests that depend on it
|
sudo hostname ghaction-runner-hostname || true # Set a consistent hostname so we can run tests that depend on it
|
||||||
sudo scutil --set HostName ghaction-runner-hostname || true
|
sudo scutil --set HostName ghaction-runner-hostname || true
|
||||||
make test
|
make test
|
||||||
# - name: Setup tmate session
|
- name: Setup tmate session
|
||||||
# if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
# uses: mxschmitt/action-tmate@v3
|
uses: mxschmitt/action-tmate@v3
|
||||||
# with:
|
with:
|
||||||
# limit-access-to-actor: true
|
limit-access-to-actor: true
|
@ -2111,6 +2111,9 @@ func TestTimestampFormat(t *testing.T) {
|
|||||||
defer testutils.BackupAndRestore(t)()
|
defer testutils.BackupAndRestore(t)()
|
||||||
userSecret := installHishtory(t, tester, "")
|
userSecret := installHishtory(t, tester, "")
|
||||||
|
|
||||||
|
// Add an entry just to ensure we get consistent table sizing
|
||||||
|
tester.RunInteractiveShell(t, "echo tablesizing")
|
||||||
|
|
||||||
// Add some entries with fixed timestamps
|
// Add some entries with fixed timestamps
|
||||||
tmz, err := time.LoadLocation("America/Los_Angeles")
|
tmz, err := time.LoadLocation("America/Los_Angeles")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -2131,9 +2134,9 @@ func TestTimestampFormat(t *testing.T) {
|
|||||||
tester.RunInteractiveShell(t, ` hishtory config-set timestamp-format '2006/Jan/2 15:04'`)
|
tester.RunInteractiveShell(t, ` hishtory config-set timestamp-format '2006/Jan/2 15:04'`)
|
||||||
|
|
||||||
// And check that it is displayed in both the tui and the classic view
|
// And check that it is displayed in both the tui and the classic view
|
||||||
out := hishtoryQuery(t, tester, "-pipefail")
|
out := hishtoryQuery(t, tester, "-pipefail -tablesizing")
|
||||||
compareGoldens(t, out, "TestTimestampFormat-query")
|
compareGoldens(t, out, "TestTimestampFormat-query")
|
||||||
out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery SPACE -pipefail ENTER"})
|
out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery SPACE -pipefail SPACE -tablesizing ENTER"})
|
||||||
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
||||||
compareGoldens(t, out, "TestTimestampFormat-tquery")
|
compareGoldens(t, out, "TestTimestampFormat-tquery")
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
-pipefail
|
-pipefail -tablesizing
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Search Query: > -pipefail
|
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 │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
Loading…
x
Reference in New Issue
Block a user