@@ -64,10 +64,11 @@ func TestResolverWithWarrants(t *testing.T) {
64
64
Verbs : []string {"get" },
65
65
NonResourceURLs : []string {"/readyz" },
66
66
}
67
- getMetrics := & authorizer.DefaultNonResourceRuleInfo {
67
+ // TODO(cnvergence): restore the commented lines once we drop the global service account feature flag
68
+ /* getMetrics := &authorizer.DefaultNonResourceRuleInfo{
68
69
Verbs: []string{"get"},
69
70
NonResourceURLs: []string{"/metrics"},
70
- }
71
+ } */
71
72
getRoot := & authorizer.DefaultNonResourceRuleInfo {
72
73
Verbs : []string {"get" },
73
74
NonResourceURLs : []string {"/" },
@@ -128,16 +129,19 @@ func TestResolverWithWarrants(t *testing.T) {
128
129
wantResourceRules : []authorizer.ResourceRuleInfo {getServices },
129
130
wantNonResourceRules : nil , // global service accounts do no work without a cluster.
130
131
},
132
+ // TODO(cnvergence): restore the commented lines once we drop the global service account feature flag
131
133
{
132
- name : "service account with this cluster" ,
133
- user : & user.DefaultInfo {Name : "system:serviceaccount:default:sa" , Groups : []string {"system:serviceaccounts" , user .AllAuthenticated }, Extra : map [string ][]string {authserviceaccount .ClusterNameKey : {"this" }}},
134
- wantResourceRules : []authorizer.ResourceRuleInfo {getServices },
135
- wantNonResourceRules : []authorizer.NonResourceRuleInfo {getReadyz },
134
+ name : "service account with this cluster" ,
135
+ user : & user.DefaultInfo {Name : "system:serviceaccount:default:sa" , Groups : []string {"system:serviceaccounts" , user .AllAuthenticated }, Extra : map [string ][]string {authserviceaccount .ClusterNameKey : {"this" }}},
136
+ wantResourceRules : []authorizer.ResourceRuleInfo {getServices },
137
+ //wantNonResourceRules: []authorizer.NonResourceRuleInfo{getReadyz},
138
+ wantNonResourceRules : nil ,
136
139
},
137
140
{
138
- name : "service account with other cluster" ,
139
- user : & user.DefaultInfo {Name : "system:serviceaccount:default:sa" , Groups : []string {"system:serviceaccounts" , user .AllAuthenticated }, Extra : map [string ][]string {authserviceaccount .ClusterNameKey : {"other" }}},
140
- wantNonResourceRules : []authorizer.NonResourceRuleInfo {getMetrics },
141
+ name : "service account with other cluster" ,
142
+ user : & user.DefaultInfo {Name : "system:serviceaccount:default:sa" , Groups : []string {"system:serviceaccounts" , user .AllAuthenticated }, Extra : map [string ][]string {authserviceaccount .ClusterNameKey : {"other" }}},
143
+ //wantNonResourceRules: []authorizer.NonResourceRuleInfo{getMetrics},
144
+ wantNonResourceRules : nil ,
141
145
},
142
146
{
143
147
name : "base with service account warrant without cluster, ignored" ,
0 commit comments