@@ -42,12 +42,26 @@ var (
42
42
AdditionalMembers : map [string ][]string {"acid" : []string {"batman" }},
43
43
},
44
44
},
45
+ {
46
+ TypeMeta : metav1.TypeMeta {
47
+ Kind : "PostgresTeam" ,
48
+ APIVersion : "acid.zalan.do/v1" ,
49
+ },
50
+ ObjectMeta : metav1.ObjectMeta {
51
+ Name : "teamD" ,
52
+ },
53
+ Spec : acidv1.PostgresTeamSpec {
54
+ AdditionalSuperuserTeams : map [string ][]string {},
55
+ AdditionalTeams : map [string ][]string {"teamA" : []string {"teamD" }, "teamC" : []string {"teamD" }, "teamD" : []string {"teamA" , "teamB" , "teamC" }},
56
+ AdditionalMembers : map [string ][]string {"acid" : []string {"batman" }},
57
+ },
58
+ },
45
59
},
46
60
}
47
61
pgTeamMap = PostgresTeamMap {
48
62
"teamA" : {
49
63
AdditionalSuperuserTeams : []string {"teamB" , "team24x7" },
50
- AdditionalTeams : []string {"teamC" },
64
+ AdditionalTeams : []string {"teamC" , "teamD" },
51
65
AdditionalMembers : []string {},
52
66
},
53
67
"teamB" : {
57
71
},
58
72
"teamC" : {
59
73
AdditionalSuperuserTeams : []string {"team24x7" },
60
- AdditionalTeams : []string {"teamA" , "teamB" , "acid" },
74
+ AdditionalTeams : []string {"teamA" , "teamB" , "teamD" , "acid" },
75
+ AdditionalMembers : []string {},
76
+ },
77
+ "teamD" : {
78
+ AdditionalSuperuserTeams : []string {},
79
+ AdditionalTeams : []string {"teamA" , "teamB" , "teamC" },
61
80
AdditionalMembers : []string {},
62
81
},
63
82
"team24x7" : {
@@ -119,14 +138,14 @@ func TestGetAdditionalTeams(t *testing.T) {
119
138
"Check that additional teams are returned" ,
120
139
"teamA" ,
121
140
false ,
122
- []string {"teamC" },
141
+ []string {"teamC" , "teamD" },
123
142
"GetAdditionalTeams returns wrong list" ,
124
143
},
125
144
{
126
145
"Check that additional teams are returned incl. transitive teams" ,
127
146
"teamA" ,
128
147
true ,
129
- []string {"teamC" , "teamB" , "acid" },
148
+ []string {"teamC" , "teamD" , " teamB" , "acid" },
130
149
"GetAdditionalTeams returns wrong list" ,
131
150
},
132
151
{
0 commit comments