]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm-remote/sync/triggers_test.go
tests: add and use testutil package to reduce duplication
[safcm/safcm.git] / cmd / safcm-remote / sync / triggers_test.go
index 0b8bbe86f4adb1fbd1e34b76e98e11f39cf6ac3e..9775ed546590f26cef5b322f7c04e9fc6276a8d4 100644 (file)
 package sync
 
 import (
-       "reflect"
        "testing"
 
-       "github.com/google/go-cmp/cmp"
+       "ruderich.org/simon/safcm/testutil"
 )
 
 func TestTriggerPaths(t *testing.T) {
@@ -57,9 +56,7 @@ func TestTriggerPaths(t *testing.T) {
        for _, tc := range tests {
                t.Run(tc.name, func(t *testing.T) {
                        res := triggerPaths(tc.path)
-                       if !reflect.DeepEqual(tc.exp, res) {
-                               t.Errorf("res: %s", cmp.Diff(tc.exp, res))
-                       }
+                       testutil.AssertEqual(t, "res", res, tc.exp)
                })
        }
 }