aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-29 18:10:56 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-29 18:10:56 +0200
commit70a64db6bca2aaa5cfee4d50d582d575be21d5fe (patch)
tree4dfcda60ee83509fe22ae47c7a01ab4cdbb4429c
parentfdef08a2b07a40893d766d41aeece1c2e3c47b2d (diff)
downloaddna-backup-70a64db6bca2aaa5cfee4d50d582d575be21d5fe.tar.gz
dna-backup-70a64db6bca2aaa5cfee4d50d582d575be21d5fe.zip
catch all symlink test errors
-rw-r--r--repo_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/repo_test.go b/repo_test.go
index 3885e0b..63a1184 100644
--- a/repo_test.go
+++ b/repo_test.go
@@ -188,9 +188,15 @@ func TestSymlinks(t *testing.T) {
if err = f.Close(); err != nil {
t.Fatal(err)
}
- os.Symlink(extDir, filepath.Join(tmpDir, "linkexternal"))
- os.Symlink("./notexisting", filepath.Join(tmpDir, "linknotexisting"))
- os.Symlink("./existing", filepath.Join(tmpDir, "linkexisting"))
+ if err = os.Symlink(extDir, filepath.Join(tmpDir, "linkexternal")); err != nil {
+ t.Fatal(err)
+ }
+ if err = os.Symlink("./notexisting", filepath.Join(tmpDir, "linknotexisting")); err != nil {
+ t.Fatal(err)
+ }
+ if err = os.Symlink("./existing", filepath.Join(tmpDir, "linkexisting")); err != nil {
+ t.Fatal(err)
+ }
files := listFiles(tmpDir)
fmt.Println(files)
testutils.AssertLen(t, 2, files, "Files")