]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm-remote/sync/packages_debian_test.go
tests: go fmt and rewrap
[safcm/safcm.git] / cmd / safcm-remote / sync / packages_debian_test.go
index 51b6b746865da76bee636a81e7717a9d1ca9b995..ff0e066ae0d8e8ad806bdd4d1fbfe1d7521c6dc0 100644 (file)
@@ -301,30 +301,30 @@ install ok installed      golang-1.16-src
 
        for _, tc := range tests {
                t.Run(tc.name, func(t *testing.T) {
-               s, res := prepareSync(tc.req, &testRunner{
-                       t:         t,
-                       expCmds:   tc.expCmds,
-                       resStdout: tc.stdout,
-                       resStderr: tc.stderr,
-                       resError:  tc.errors,
-               })
+                       s, res := prepareSync(tc.req, &testRunner{
+                               t:         t,
+                               expCmds:   tc.expCmds,
+                               resStdout: tc.stdout,
+                               resStderr: tc.stderr,
+                               resError:  tc.errors,
+                       })
 
-               err := s.syncPackagesDebian()
-               // Ugly but the simplest way to compare errors (including nil)
-               if fmt.Sprintf("%s", err) != fmt.Sprintf("%s", tc.expErr) {
-                       t.Errorf("err = %#v, want %#v",
-                               err, tc.expErr)
-               }
-               dbg := res.Wait()
+                       err := s.syncPackagesDebian()
+                       // Ugly but the simplest way to compare errors (including nil)
+                       if fmt.Sprintf("%s", err) != fmt.Sprintf("%s", tc.expErr) {
+                               t.Errorf("err = %#v, want %#v",
+                                       err, tc.expErr)
+                       }
+                       dbg := res.Wait()
 
-               if !reflect.DeepEqual(tc.expResp, s.resp) {
-                       t.Errorf("resp: %s",
-                               cmp.Diff(tc.expResp, s.resp))
-               }
-               if !reflect.DeepEqual(tc.expDbg, dbg) {
-                       t.Errorf("dbg: %s",
-                               cmp.Diff(tc.expDbg, dbg))
-               }
+                       if !reflect.DeepEqual(tc.expResp, s.resp) {
+                               t.Errorf("resp: %s",
+                                       cmp.Diff(tc.expResp, s.resp))
+                       }
+                       if !reflect.DeepEqual(tc.expDbg, dbg) {
+                               t.Errorf("dbg: %s",
+                                       cmp.Diff(tc.expDbg, dbg))
+                       }
                })
        }
 }