Skip to content

Commit

Permalink
[Feature][RayCluster]: introduce RayClusterSuspending and RayClusterS…
Browse files Browse the repository at this point in the history
…uspended conditions

Signed-off-by: Rueian <[email protected]>
  • Loading branch information
rueian committed Oct 8, 2024
1 parent eb9dcf8 commit 7bd5968
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ray-operator/controllers/ray/raycluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ var _ = Context("Inside the default namespace", func() {
Eventually(findRayClusterSuspendStatus, time.Second*3, time.Millisecond*500).
WithArguments(ctx, rayCluster).Should(Equal(rayv1.RayClusterSuspended))
Expect(meta.IsStatusConditionTrue(rayCluster.Status.Conditions, string(rayv1.RayClusterProvisioned))).To(BeFalse())
// rayCluster.Status.Head.PodName will be cleared.
// rayCluster.Status.Head.PodIP will also be cleared, but we don't test it here since we don't have IPs in tests.
Expect(rayCluster.Status.Head.PodName).To(BeEmpty())
}
})
Expand Down Expand Up @@ -594,6 +596,8 @@ var _ = Context("Inside the default namespace", func() {
Eventually(findRayClusterSuspendStatus, time.Second*3, time.Millisecond*500).
WithArguments(ctx, rayCluster).Should(BeEmpty())
Expect(meta.IsStatusConditionTrue(rayCluster.Status.Conditions, string(rayv1.RayClusterProvisioned))).To(BeTrue())
// rayCluster.Status.Head.PodName should have a value now.
// rayCluster.Status.Head.PodIP should also have a value now, but we don't test it here since we don't have IPs in tests.
Expect(rayCluster.Status.Head.PodName).NotTo(BeEmpty())
}
})
Expand Down

0 comments on commit 7bd5968

Please sign in to comment.