File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -99,18 +99,22 @@ func TestBlackListResources(t *testing.T) {
99
99
100
100
expectedBlackList := []string {"namespaces.v1." , "pods.v1." }
101
101
if ! reflect .DeepEqual (meshsyncConfig .BlackList , expectedBlackList ) {
102
- t .Error ("WhiteListed resources not equal" )
102
+ t .Error ("BlackListed resources not equal" )
103
103
}
104
104
105
105
// now we assertain the global and local pipelines have been correctly configured
106
106
// excempted global pipelines: namespaces
107
107
// excempted local pipelines: pods, replicasets
108
108
109
- if len (meshsyncConfig .Pipelines ["global" ]) != 5 {
110
- t .Error ("global pipelines not well configured expected 5" )
109
+ // counting expected pipelines after blacklist
110
+ expectedGlobalCount := len (meshsyncConfig .Pipelines ["global" ]) - 1 //excluding namespaces
111
+ expectedLocalCount := len (meshsyncConfig .Pipelines ["local" ]) - 2 //excluding pods, replicasets
112
+
113
+ if len (meshsyncConfig .Pipelines ["global" ]) != expectedGlobalCount {
114
+ t .Errorf ("global pipelines not well configured expected %d" , expectedGlobalCount )
111
115
}
112
116
113
- if len (meshsyncConfig .Pipelines ["local" ]) != 14 {
114
- t .Error ( "global pipelines not well configured expected 15" )
117
+ if len (meshsyncConfig .Pipelines ["local" ]) != expectedLocalCount {
118
+ t .Errorf ( "local pipelines not well configured expected %d" , expectedLocalCount )
115
119
}
116
120
}
You can’t perform that action at this time.
0 commit comments