Skip to content

Commit

Permalink
Merge pull request #882 from mhenriks/flaky-webhook-test
Browse files Browse the repository at this point in the history
fix flaky webhook test
  • Loading branch information
j-griffith committed Jul 15, 2019
2 parents fd92d71 + cc58fdd commit edc7355
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tests

import (
"fmt"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -66,8 +67,10 @@ var _ = Describe("Clone Auth Webhook tests", func() {
addPermissionToNamespace(f.K8sClient, serviceAccountName, targetNamespace.Name, f.Namespace.Name)

// now can list dvs in source
_, err = client.CdiV1alpha1().DataVolumes(f.Namespace.Name).List(metav1.ListOptions{})
Expect(err).ToNot(HaveOccurred())
Eventually(func() error {
_, err = client.CdiV1alpha1().DataVolumes(f.Namespace.Name).List(metav1.ListOptions{})
return err
}, 60*time.Second, 2*time.Second).ShouldNot(HaveOccurred())

// now can create clone of dv in source
_, err = client.CdiV1alpha1().DataVolumes(targetNamespace.Name).Create(targetDV)
Expand Down

0 comments on commit edc7355

Please sign in to comment.