]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm/sync_info_test.go
tests: use subtests
[safcm/safcm.git] / cmd / safcm / sync_info_test.go
index b883bb75c6e29552e227b1c3c297b8153796060b..f234d9b17b95b031d737b70008c49d77b3b425d4 100644 (file)
@@ -68,10 +68,12 @@ func TestHostInfoRespToGroups(t *testing.T) {
        }
 
        for _, tc := range tests {
+               t.Run(tc.name, func(t *testing.T) {
                res := hostInfoRespToGroups(tc.resp)
                if !reflect.DeepEqual(tc.exp, res) {
-                       t.Errorf("%s: res: %s", tc.name,
+                       t.Errorf("res: %s",
                                cmp.Diff(tc.exp, res))
                }
+               })
        }
 }