]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm/config/groups_test.go
config: return map from TransitivelyDetectedGroups()
[safcm/safcm.git] / cmd / safcm / config / groups_test.go
index 63c26836d92de66969904d643d77d7c9ae9a8222..7c3dd483393e9dbb5791004633358912c705285b 100644 (file)
@@ -332,7 +332,7 @@ func TestTransitivelyDetectedGroups(t *testing.T) {
        tests := []struct {
                name   string
                groups map[string][]string
-               exp    []string
+               exp    map[string]bool
        }{
 
                {
@@ -351,7 +351,7 @@ func TestTransitivelyDetectedGroups(t *testing.T) {
                                        "d",
                                },
                        },
-                       nil,
+                       map[string]bool{},
                },
 
                {
@@ -367,8 +367,8 @@ func TestTransitivelyDetectedGroups(t *testing.T) {
                                        "d",
                                },
                        },
-                       []string{
-                               "group-a",
+                       map[string]bool{
+                               "group-a": true,
                        },
                },
 
@@ -389,8 +389,8 @@ func TestTransitivelyDetectedGroups(t *testing.T) {
                                        "d",
                                },
                        },
-                       []string{
-                               "group-a",
+                       map[string]bool{
+                               "group-a": true,
                        },
                },
 
@@ -418,12 +418,12 @@ func TestTransitivelyDetectedGroups(t *testing.T) {
                                        "b",
                                },
                        },
-                       []string{
-                               "group-a",
-                               "group-b",
-                               "group-c",
-                               "group-d",
-                               "group-e",
+                       map[string]bool{
+                               "group-a": true,
+                               "group-b": true,
+                               "group-c": true,
+                               "group-d": true,
+                               "group-e": true,
                        },
                },
 
@@ -453,12 +453,12 @@ func TestTransitivelyDetectedGroups(t *testing.T) {
                                        "b",
                                },
                        },
-                       []string{
-                               "group-a",
-                               "group-b",
-                               "group-c",
-                               "group-d",
-                               "group-e",
+                       map[string]bool{
+                               "group-a": true,
+                               "group-b": true,
+                               "group-c": true,
+                               "group-d": true,
+                               "group-e": true,
                        },
                },
        }