More test fixes

This commit is contained in:
David Dworken 2024-09-15 22:00:11 -07:00
parent c674e04fb8
commit 870243df74
No known key found for this signature in database
2 changed files with 9 additions and 9 deletions

View File

@ -105,11 +105,11 @@ jobs:
with: with:
name: goldens-used-${{ matrix.os }}-${{ matrix.test_shard }} name: goldens-used-${{ matrix.os }}-${{ matrix.test_shard }}
path: /tmp/goldens-used.txt path: /tmp/goldens-used.txt
- 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
check-goldens: check-goldens:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: test needs: test

View File

@ -2478,7 +2478,7 @@ echo bar`)
out = tester.RunInteractiveShell(t, `hishtory query -pipefail`) out = tester.RunInteractiveShell(t, `hishtory query -pipefail`)
testutils.CompareGoldens(t, out, fmt.Sprintf("testCustomColumns-query-isAction=%v", testutils.IsGithubAction())) testutils.CompareGoldens(t, out, fmt.Sprintf("testCustomColumns-query-isAction=%v", testutils.IsGithubAction()))
out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery SPACE ENTER", "-pipefail"}) out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery SPACE ENTER", "-pipefail"})
out = stripRequiredPrefix(t, out, "hishtory tquery -pipefail") out = stripRequiredPrefix(t, out, "hishtory tquery")
testName := "testCustomColumns-tquery-" + tester.ShellName() testName := "testCustomColumns-tquery-" + tester.ShellName()
if testutils.IsGithubAction() { if testutils.IsGithubAction() {
testName += "-isAction" testName += "-isAction"
@ -2735,7 +2735,7 @@ func TestTimestampFormat(t *testing.T) {
out := hishtoryQuery(t, tester, "-pipefail -tablesizing") out := hishtoryQuery(t, tester, "-pipefail -tablesizing")
testutils.CompareGoldens(t, out, "TestTimestampFormat-query") testutils.CompareGoldens(t, out, "TestTimestampFormat-query")
out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery ENTER", "-pipefail SPACE -tablesizing"}) out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery ENTER", "-pipefail SPACE -tablesizing"})
out = stripRequiredPrefix(t, out, "hishtory tquery -pipefail -tablesizing") out = stripRequiredPrefix(t, out, "hishtory tquery")
testutils.CompareGoldens(t, out, "TestTimestampFormat-tquery") testutils.CompareGoldens(t, out, "TestTimestampFormat-tquery")
} }
@ -2836,7 +2836,7 @@ echo foo`)
out = tester.RunInteractiveShell(t, `hishtory query -pipefail`) out = tester.RunInteractiveShell(t, `hishtory query -pipefail`)
testutils.CompareGoldens(t, out, "testRemoveDuplicateRows-query") testutils.CompareGoldens(t, out, "testRemoveDuplicateRows-query")
out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery ENTER", "-pipefail"}) out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery ENTER", "-pipefail"})
out = stripRequiredPrefix(t, out, "hishtory tquery -pipefail") out = stripRequiredPrefix(t, out, "hishtory tquery")
testutils.CompareGoldens(t, out, "testRemoveDuplicateRows-tquery") testutils.CompareGoldens(t, out, "testRemoveDuplicateRows-tquery")
// And change the config to filter out duplicate rows // And change the config to filter out duplicate rows
@ -2852,7 +2852,7 @@ echo foo`)
// Check tquery // Check tquery
out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery ENTER", "-pipefail"}) out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery ENTER", "-pipefail"})
out = stripRequiredPrefix(t, out, "hishtory tquery -pipefail") out = stripRequiredPrefix(t, out, "hishtory tquery")
testutils.CompareGoldens(t, out, "testRemoveDuplicateRows-enabled-tquery") testutils.CompareGoldens(t, out, "testRemoveDuplicateRows-enabled-tquery")
// Check actually selecting it with query // Check actually selecting it with query