Skip to content

Commit

Permalink
Bug 1765294: Test timing of SA pull secret creation
Browse files Browse the repository at this point in the history
Ensure service account pull secrets are created in 2 seconds or less.
  • Loading branch information
adambkaplan committed Apr 1, 2020
1 parent 1c8b98f commit 4922f6b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/extended/controller_manager/pull_secret.go
Expand Up @@ -195,4 +195,20 @@ var _ = g.Describe("[sig-devex][Feature:OpenShiftControllerManager]", func() {
t.Fatalf("error waiting for pull secret deletion: %v", err)
}
})

g.It("create service account pull secrets timing", func() {
clusterAdminKubeClient := oc.AdminKubeClient()
saNamespace := oc.Namespace()

g.By("creating test service account")
sa := &corev1.ServiceAccount{
ObjectMeta: metav1.ObjectMeta{Name: "new-sa", Namespace: saNamespace},
}

sa, err := clusterAdminKubeClient.CoreV1().ServiceAccounts(sa.Namespace).Create(sa)
o.Expect(err).NotTo(o.HaveOccurred())
g.By("waiting up to 2 seconds for the service account's pull secret to be created")
_, _, err = waitForServiceAccountPullSecret(clusterAdminKubeClient, sa.Namespace, sa.Name, 20, 100*time.Millisecond)
o.Expect(err).NotTo(o.HaveOccurred())
})
})

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4922f6b

Please sign in to comment.