]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
sync: tests: check return value of setDefaults()
authorSimon Ruderich <simon@ruderich.org>
Sun, 9 May 2021 10:13:37 +0000 (12:13 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 9 May 2021 13:15:43 +0000 (15:15 +0200)
cmd/safcm-remote/sync/files_test.go

index 3cf7e04358386909a237150536e50d7acf03416d..5787404519936d519272a5050cebfec467ec64b1 100644 (file)
@@ -850,7 +850,10 @@ func TestSyncFiles(t *testing.T) {
                        s, res := prepareSync(tc.req, &testRunner{
                                t: t,
                        })
-                       s.setDefaults()
+                       err = s.setDefaults()
+                       if err != nil {
+                               t.Fatal(err)
+                       }
 
                        err = s.syncFiles()
                        testutil.AssertErrorEqual(t, "err", err, tc.expErr)
@@ -2390,7 +2393,10 @@ file
                        s, res := prepareSync(tc.req, &testRunner{
                                t: t,
                        })
-                       s.setDefaults()
+                       err = s.setDefaults()
+                       if err != nil {
+                               t.Fatal(err)
+                       }
 
                        // Deterministic temporary symlink names
                        rand.Seed(0)