]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm-remote/sync/files_test.go
sync: include size in binary "diff"
[safcm/safcm.git] / cmd / safcm-remote / sync / files_test.go
index 5787404519936d519272a5050cebfec467ec64b1..27011ac96c3e75bdd9f8fd3130e5bcceda887c20 100644 (file)
@@ -415,10 +415,7 @@ func TestSyncFiles(t *testing.T) {
                                },
                        },
                        func() {
-                               err = os.Chmod(".", 0750)
-                               if err != nil {
-                                       panic(err)
-                               }
+                               ft.CreateDirectoryExists(".", 0750)
                                ft.CreateDirectory("dir", 0755)
                                ft.CreateFile("dir/file", "content\n", 0644)
                        },
@@ -2242,7 +2239,7 @@ file
                                                        Group: group,
                                                        Gid:   gid,
                                                },
-                                               DataDiff: "Binary files differ, cannot show diff",
+                                               DataDiff: "Binary files differ (3 -> 4 bytes), cannot show diff",
                                        },
                                },
                        },
@@ -2298,7 +2295,7 @@ file
                                                        Gid:   gid,
                                                },
                                                DataDiff: `@@ -1,2 +1,2 @@
--<binary content>
+-<binary content, 3 bytes>
 +content
  
 `,
@@ -2358,7 +2355,7 @@ file
                                                },
                                                DataDiff: `@@ -1,2 +1,2 @@
 -content
-+<binary content>
++<binary content, 4 bytes>
  
 `,
                                        },