...
|
...
|
@@ -85,6 +85,9 @@ func TestServiceAccountAuthorization(t *testing.T) {
|
85
|
85
|
t.Fatalf("could not add role to service account")
|
86
|
86
|
}
|
87
|
87
|
|
|
88
|
+ // Give the policy cache a second to catch it's breath
|
|
89
|
+ time.Sleep(time.Second)
|
|
90
|
+
|
88
|
91
|
// Make sure the service account now has access
|
89
|
92
|
// This tests authentication using the etcd-based token getter
|
90
|
93
|
passNS := &api.Namespace{ObjectMeta: api.ObjectMeta{Name: "test-pass"}}
|
...
|
...
|
@@ -167,6 +170,9 @@ func TestServiceAccountAuthorization(t *testing.T) {
|
167
|
167
|
t.Fatalf("could not add role to service account")
|
168
|
168
|
}
|
169
|
169
|
|
|
170
|
+ // Give the policy cache a second to catch it's breath
|
|
171
|
+ time.Sleep(time.Second)
|
|
172
|
+
|
170
|
173
|
// Make sure the service account now has access to cluster2
|
171
|
174
|
passNS2 := &api.Namespace{ObjectMeta: api.ObjectMeta{Name: "test-pass2"}}
|
172
|
175
|
if _, err := cluster2SAKubeClient.Namespaces().Create(passNS2); err != nil {
|