mirror of
https://github.com/ddworken/hishtory.git
synced 2025-01-11 16:58:47 +01:00
Clear out ~/.other-path/ in tests since it wasn't getting cleared, which meant retries were guaranteed to fail for this function
This commit is contained in:
parent
c5bdee9ad5
commit
d80afc27d4
@ -1196,7 +1196,14 @@ echo other`)
|
||||
func TestInstallViaPythonScriptWithCustomHishtoryPath(t *testing.T) {
|
||||
defer testutils.BackupAndRestore(t)()
|
||||
defer testutils.BackupAndRestoreEnv("HISHTORY_PATH")()
|
||||
os.Setenv("HISHTORY_PATH", ".other-path")
|
||||
altHishtoryPath := ".other-path"
|
||||
os.Setenv("HISHTORY_PATH", altHishtoryPath)
|
||||
|
||||
// Make sure ~/$HISHTORY_PATH/ is also cleared out and empty
|
||||
homedir, err := os.UserHomeDir()
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, os.RemoveAll(path.Join(homedir, altHishtoryPath)))
|
||||
|
||||
testInstallViaPythonScriptChild(t, bashTester{})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user