diff --git a/pkg/baur/inputresolver_test.go b/pkg/baur/inputresolver_test.go index 344a10c4..5cb2710e 100644 --- a/pkg/baur/inputresolver_test.go +++ b/pkg/baur/inputresolver_test.go @@ -2,6 +2,7 @@ package baur import ( "context" + "errors" "fmt" "os" "path/filepath" @@ -631,7 +632,7 @@ func TestResolveSymlink(t *testing.T) { testdir: "directory_broken", inputPath: "**", validateFn: func(t *testing.T, err error, result []Input) { - require.Truef(t, os.IsNotExist(err), "expected not exist os error, got: %s", err) + require.Truef(t, os.IsNotExist(errors.Unwrap(err)), "expected not exist os error, got: %s", err) require.Empty(t, result) }, }, @@ -639,7 +640,7 @@ func TestResolveSymlink(t *testing.T) { testdir: "file_broken", inputPath: "symlink", validateFn: func(t *testing.T, err error, result []Input) { - require.Truef(t, os.IsNotExist(err), "expected not exist os error, got: %s", err) + require.Truef(t, os.IsNotExist(errors.Unwrap(err)), "expected not exist os error, got: %s", err) require.Empty(t, result) }, }, @@ -647,7 +648,7 @@ func TestResolveSymlink(t *testing.T) { testdir: "file_broken", inputPath: "**", validateFn: func(t *testing.T, err error, result []Input) { - require.Truef(t, os.IsNotExist(err), "expected not exist os error, got: %s", err) + require.Truef(t, os.IsNotExist(errors.Unwrap(err)), "expected not exist os error, got: %s", err) require.Empty(t, result) }, }, @@ -698,7 +699,7 @@ func TestResolveSymlink(t *testing.T) { testdir: "symlinks", inputPath: "directory_containing_broken_symlin**/**", validateFn: func(t *testing.T, err error, _ []Input) { - require.Truef(t, os.IsNotExist(err), "expected not exist os error, got: %s", err) + require.Truef(t, os.IsNotExist(errors.Unwrap(err)), "expected not exist os error, got: %s", err) }, }, }