Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: AiRanthem <[email protected]>
  • Loading branch information
AiRanthem committed Nov 7, 2024
1 parent 64d02dd commit 1d3cbf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/test/tester/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
func TestClientFunctions(c client.Client) {
ctx := context.Background()
namespace, name := "test-"+rand.RandomString(4), "fake"
Ω(k8s.EnsureNamespace(ctx, c, namespace)).To(Succeed())
Eventually(k8s.EnsureNamespace(ctx, c, namespace), time.Minute).Should(Succeed()) // preventing the cache goroutine starts too slow
deploy := &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: name},
Spec: appsv1.DeploymentSpec{
Expand All @@ -48,7 +48,7 @@ func TestClientFunctions(c client.Client) {
},
},
}
Eventually(c.Create(ctx, deploy), time.Minute).Should(Succeed()) // preventing the cache goroutine starts too slow
Ω(c.Create(ctx, deploy)).To(Succeed())
Ω(c.Get(ctx, client.ObjectKey{Namespace: namespace, Name: name}, deploy)).To(Succeed())
Ω(c.List(ctx, &corev1.ServiceList{})).To(Succeed())
Ω(c.Update(ctx, deploy)).To(Succeed())
Expand Down

0 comments on commit 1d3cbf2

Please sign in to comment.