Merge pull request #44996 from liggitt/token-test

Automatic merge from submit-queue

Update token controller test to test async retry

Fixes #44819

https://github.com/kubernetes/kubernetes/pull/44625 changed the token controller to queue a retry if the live service account's resourceVersion did not match our cache.

This updates the unit test that was testing that condition to test async queue behavior (which this condition now drives)
pull/6/head
Kubernetes Submit Queue 2017-04-27 08:39:04 -07:00 committed by GitHub
commit dc92a6fcc7
1 changed files with 3 additions and 0 deletions

View File

@ -369,10 +369,13 @@ func TestTokenCreation(t *testing.T) {
},
"updated serviceaccount with no secrets with resource conflict": {
ClientObjects: []runtime.Object{updatedServiceAccount(emptySecretReferences())},
IsAsync: true,
MaxRetries: 1,
UpdatedServiceAccount: serviceAccount(emptySecretReferences()),
ExpectedActions: []core.Action{
core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"),
core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"),
},
},