Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cupnes committed Mar 12, 2024
1 parent dd0fd60 commit 41b8f96
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var _ = BeforeSuite(func() {
_, _, err := kubectlWithInput([]byte(manifest), "apply", "-f", "-")
Expect(err).NotTo(HaveOccurred())

By("[BeforeSuite] Waiting for rook to get ready")
By("[BeforeSuite] Waiting for rook-ceph-operator to get ready")
Eventually(func() error {
stdout, stderr, err := kubectl("-n", namespace, "get", "deploy", "rook-ceph-operator", "-o", "json")
if err != nil {
Expand All @@ -100,7 +100,27 @@ var _ = BeforeSuite(func() {
}

if deploy.Status.AvailableReplicas != 1 {
return fmt.Errorf("rook operator is not available yet")
return fmt.Errorf("rook-ceph-operator is not available yet")
}

return nil
}).Should(Succeed())

By("[BeforeSuite] Waiting for rook-ceph-tools to get ready")
Eventually(func() error {
stdout, stderr, err := kubectl("-n", namespace, "get", "deploy", "rook-ceph-tools", "-o", "json")
if err != nil {
return fmt.Errorf("kubectl get deploy failed. stderr: %s, err: %w", string(stderr), err)
}

var deploy appsv1.Deployment
err = yaml.Unmarshal(stdout, &deploy)
if err != nil {
return err
}

if deploy.Status.AvailableReplicas != 1 {
return fmt.Errorf("rook-ceph-tools is not available yet")
}

return nil
Expand Down

0 comments on commit 41b8f96

Please sign in to comment.