From 3fb1615d2612ef6ca6075aceccdf5af7049e1d2e Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 31 Oct 2024 10:11:58 +0100 Subject: [PATCH] [no-relnote] Address lint errors in test Signed-off-by: Evan Lezar --- cmd/nvidia-cdi-hook/create-symlinks/create-symlinks_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/nvidia-cdi-hook/create-symlinks/create-symlinks_test.go b/cmd/nvidia-cdi-hook/create-symlinks/create-symlinks_test.go index b9b23c0f..eb673382 100644 --- a/cmd/nvidia-cdi-hook/create-symlinks/create-symlinks_test.go +++ b/cmd/nvidia-cdi-hook/create-symlinks/create-symlinks_test.go @@ -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)