[no-relnote] Address lint errors in test

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2024-10-31 10:11:58 +01:00
parent 9e4696bf7d
commit 3fb1615d26
No known key found for this signature in database

View File

@ -140,8 +140,8 @@ func TestCreateLink(t *testing.T) {
}
for _, expectedLink := range tc.expectedLinks {
path := strings.Replace(expectedLink.path, "{{ .containerRoot }}", containerRoot, -1)
path = strings.Replace(path, "{{ .hostRoot }}", hostRoot, -1)
path := strings.ReplaceAll(expectedLink.path, "{{ .containerRoot }}", containerRoot)
path = strings.ReplaceAll(path, "{{ .hostRoot }}", hostRoot)
if expectedLink.target != "" {
target, err := symlinks.Resolve(path)
require.ErrorIs(t, err, expectedLink.err)