mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-22 08:14:02 +01:00
Normalize hostnames in goldens so that golden files work well for local tests too
This commit is contained in:
parent
0a8879997f
commit
8419a883b4
@ -362,6 +362,7 @@ func CompareGoldens(t testing.TB, out, goldenName string) {
|
||||
out = normalizeHostnames(out)
|
||||
goldenPath := path.Join(initialWd, "client/lib/goldens/", goldenName)
|
||||
expected, err := os.ReadFile(goldenPath)
|
||||
expected = []byte(normalizeHostnames(string(expected)))
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
expected = []byte("ERR_FILE_NOT_FOUND:" + goldenPath)
|
||||
|
Loading…
Reference in New Issue
Block a user