Skip to content

Commit

Permalink
Reduce CSV e2e test failure rate
Browse files Browse the repository at this point in the history
  • Loading branch information
awgreene committed Dec 19, 2020
1 parent e2b51e2 commit 8a31e33
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions test/e2e/csv_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1306,28 +1306,42 @@ var _ = Describe("ClusterServiceVersion", func() {
Expect(err).ShouldNot(HaveOccurred(), "error getting expected APIService")

// Should create Service
_, err = c.GetService(testNamespace, serviceName)
Expect(err).ShouldNot(HaveOccurred(), "error getting expected Service")
Eventually(func() error {
_, err := c.GetService(testNamespace, serviceName)
return err
}, timeout, interval).ShouldNot(HaveOccurred())

// Should create certificate Secret
secretName = fmt.Sprintf("%s-cert", serviceName)
_, err = c.GetSecret(testNamespace, secretName)
Expect(err).ShouldNot(HaveOccurred(), "error getting expected Secret")
Eventually(func() error {
_, err = c.GetSecret(testNamespace, secretName)
return err
}, timeout, interval).ShouldNot(HaveOccurred())

// Should create a Role for the Secret
_, err = c.GetRole(testNamespace, secretName)
Expect(err).ShouldNot(HaveOccurred(), "error getting expected Secret Role")
Eventually(func() error {
_, err = c.GetRole(testNamespace, secretName)
return err
}, timeout, interval).ShouldNot(HaveOccurred())

// Should create a RoleBinding for the Secret
_, err = c.GetRoleBinding(testNamespace, secretName)
Expect(err).ShouldNot(HaveOccurred(), "error getting exptected Secret RoleBinding")
Eventually(func() error {
_, err = c.GetRoleBinding(testNamespace, secretName)
return err
}, timeout, interval).ShouldNot(HaveOccurred())

// Should create a system:auth-delegator Cluster RoleBinding
_, err = c.GetClusterRoleBinding(fmt.Sprintf("%s-system:auth-delegator", serviceName))
Expect(err).ShouldNot(HaveOccurred(), "error getting expected system:auth-delegator ClusterRoleBinding")
Eventually(func() error {
_, err = c.GetClusterRoleBinding(fmt.Sprintf("%s-system:auth-delegator", serviceName))
return err
}, timeout, interval).ShouldNot(HaveOccurred())

// Should create an extension-apiserver-authentication-reader RoleBinding in kube-system
_, err = c.GetRoleBinding("kube-system", fmt.Sprintf("%s-auth-reader", serviceName))
Eventually(func() error {
_, err = c.GetRoleBinding("kube-system", fmt.Sprintf("%s-auth-reader", serviceName))
return err
}, timeout, interval).ShouldNot(HaveOccurred())
Expect(err).ShouldNot(HaveOccurred(), "error getting expected extension-apiserver-authentication-reader RoleBinding")

// Should eventually GC the CSV
Expand Down

0 comments on commit 8a31e33

Please sign in to comment.