From 833474fbc612347a9736ff3236e82c6715094c01 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Wed, 9 Feb 2022 17:28:56 +0100 Subject: [PATCH] test: fix assertion linting --- glob_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/glob_test.go b/glob_test.go index 53dbbd4..292dcd8 100644 --- a/glob_test.go +++ b/glob_test.go @@ -453,11 +453,13 @@ func TestGlob(t *testing.T) { // nolint:funlen t.Run("symlinks", func(t *testing.T) { t.Parallel() - testFS := testFs(t, []string{ + var fsPath string + if testFS, ok := testFs(t, []string{ "./a/file", - }, nil).(testfs.FS) + }, nil).(testfs.FS); ok { + fsPath = testFS.Path() + } - fsPath := testFS.Path() workingSymlink := filepath.Join(fsPath, "b") brokenSymlink := filepath.Join(fsPath, "c") err := os.Symlink("a", workingSymlink)