mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
20 lines
526 B
Go
20 lines
526 B
Go
package fs
|
|
|
|
import (
|
|
"io/fs"
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/restic/restic/internal/data"
|
|
"github.com/restic/restic/internal/errors"
|
|
rtest "github.com/restic/restic/internal/test"
|
|
)
|
|
|
|
func TestRestoreSymlinkTimestampsError(t *testing.T) {
|
|
d := t.TempDir()
|
|
node := data.Node{Type: data.NodeTypeSymlink}
|
|
err := nodeRestoreTimestamps(&node, d+"/nosuchfile")
|
|
rtest.Assert(t, errors.Is(err, fs.ErrNotExist), "want ErrNotExist, got %q", err)
|
|
rtest.Assert(t, strings.Contains(err.Error(), d), "filename not in %q", err)
|
|
}
|