Shaman tests: ensure the temporary storage path is not a symlink

Shaman cannot handle cases where the storage path is a symlink (i.e. cases
where `filepath.EvalSymlinks(storagePath)` does not return `storagePath`).
This caused macOS devices to fail the unit tests, because macOS uses a
symlinked path for temporary files.

This commit changes the unit tests, to always use the real path instead of
the OS-provided symlink. This does *not* fix the actual issue in Shaman,
for that see T99965.
This commit is contained in:
Sybren A. Stüvel 2022-07-25 13:03:46 +02:00
parent 6731f96579
commit 424b87d1d3

@ -25,6 +25,7 @@ package config
import (
"io/ioutil"
"os"
"path/filepath"
"time"
)
@ -35,6 +36,11 @@ func CreateTestConfig() (conf Config, cleanup func()) {
panic(err)
}
tempDir, err = filepath.EvalSymlinks(tempDir)
if err != nil {
panic(err)
}
conf = Config{
TestTempDir: tempDir,
Enabled: true,