mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-21 20:41:39 +02:00
Fix test breakage caused by new inconsistency in how GH actions sets the PATH env variable
This commit is contained in:
parent
3987b355ea
commit
1c33189f38
@ -838,13 +838,13 @@ func testHishtoryBackgroundSaving(t *testing.T, tester shellTester) {
|
|||||||
// Setup
|
// Setup
|
||||||
defer testutils.BackupAndRestore(t)()
|
defer testutils.BackupAndRestore(t)()
|
||||||
|
|
||||||
// Check that we can find the go binary
|
// Check that we can find the go binary and use that path to it for consistency
|
||||||
_, err := exec.LookPath("go")
|
goBinPath, err := exec.LookPath("go")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
// Test install with an unset HISHTORY_TEST var so that we save in the background (this is likely to be flakey!)
|
// Test install with an unset HISHTORY_TEST var so that we save in the background (this is likely to be flakey!)
|
||||||
out := tester.RunInteractiveShell(t, `unset HISHTORY_TEST
|
out := tester.RunInteractiveShell(t, `unset HISHTORY_TEST
|
||||||
CGO_ENABLED=0 go build -o /tmp/client
|
CGO_ENABLED=0 `+goBinPath+` build -o /tmp/client
|
||||||
/tmp/client install`)
|
/tmp/client install`)
|
||||||
r := regexp.MustCompile(`Setting secret hishtory key to (.*)`)
|
r := regexp.MustCompile(`Setting secret hishtory key to (.*)`)
|
||||||
matches := r.FindStringSubmatch(out)
|
matches := r.FindStringSubmatch(out)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user