@@ -34,6 +34,7 @@ import (
3434 rayv1 "github.com/ray-project/kuberay/ray-operator/apis/ray/v1"
3535 "github.com/ray-project/kuberay/ray-operator/controllers/ray/common"
3636 "github.com/ray-project/kuberay/ray-operator/controllers/ray/utils"
37+ utiltypes "github.com/ray-project/kuberay/ray-operator/controllers/ray/utils/types"
3738 "github.com/ray-project/kuberay/ray-operator/pkg/features"
3839 "github.com/ray-project/kuberay/ray-operator/test/support"
3940)
@@ -270,8 +271,8 @@ var _ = Context("RayJob with different submission modes", func() {
270271
271272 It ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
272273 // Update fake dashboard client to return job info with "Succeeded" status.
273- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
274- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
274+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
275+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
275276 }
276277 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
277278 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
@@ -495,8 +496,8 @@ var _ = Context("RayJob with different submission modes", func() {
495496
496497 It ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
497498 // Update fake dashboard client to return job info with "Succeeded" status.
498- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
499- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
499+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
500+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
500501 }
501502 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
502503 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
@@ -660,8 +661,8 @@ var _ = Context("RayJob with different submission modes", func() {
660661 It ("RayJobs's JobDeploymentStatus transitions from Running -> Retrying -> New -> Initializing" , func () {
661662 // Update fake dashboard client to return job info with "Failed" status.
662663 //nolint:unparam // this is a mock and the function signature cannot change
663- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) {
664- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
664+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) {
665+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
665666 }
666667 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
667668 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
@@ -755,8 +756,8 @@ var _ = Context("RayJob with different submission modes", func() {
755756 It ("RayJobs's JobDeploymentStatus transitions from Running -> Complete (attempt 2)" , func () {
756757 // Update fake dashboard client to return job info with "Failed" status.
757758 //nolint:unparam // this is a mock and the function signature cannot change
758- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) {
759- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
759+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) {
760+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
760761 }
761762 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
762763 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
@@ -982,8 +983,8 @@ var _ = Context("RayJob with different submission modes", func() {
982983
983984 By ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
984985 // Update fake dashboard client to return job info with "Succeeded" status.
985- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
986- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
986+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
987+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
987988 }
988989 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
989990 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
@@ -1121,8 +1122,8 @@ var _ = Context("RayJob with different submission modes", func() {
11211122
11221123 By ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
11231124 // Update fake dashboard client to return job info with "Failed" status.
1124- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1125- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
1125+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1126+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
11261127 }
11271128 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
11281129 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
@@ -1260,8 +1261,8 @@ var _ = Context("RayJob with different submission modes", func() {
12601261
12611262 By ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
12621263 // Update fake dashboard client to return job info with "Succeeded" status.
1263- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1264- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
1264+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1265+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
12651266 }
12661267 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
12671268 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
@@ -1416,8 +1417,8 @@ var _ = Context("RayJob with different submission modes", func() {
14161417
14171418 By ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
14181419 // Update fake dashboard client to return job info with "Failed" status.
1419- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1420- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
1420+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1421+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
14211422 }
14221423 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
14231424 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
@@ -1561,8 +1562,8 @@ var _ = Context("RayJob with different submission modes", func() {
15611562
15621563 By ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
15631564 // Update fake dashboard client to return job info with "Succeeded" status.
1564- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1565- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
1565+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1566+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
15661567 }
15671568 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
15681569
@@ -1677,8 +1678,8 @@ var _ = Context("RayJob with different submission modes", func() {
16771678
16781679 By ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
16791680 // Update fake dashboard client to return job info with "Failed" status.
1680- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1681- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
1681+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1682+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
16821683 }
16831684 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
16841685
@@ -1804,8 +1805,8 @@ var _ = Context("RayJob with different submission modes", func() {
18041805
18051806 By ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
18061807 // Update fake dashboard client to return job info with "Succeeded" status.
1807- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1808- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
1808+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1809+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusSucceeded , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
18091810 }
18101811 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
18111812 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
@@ -1965,8 +1966,8 @@ var _ = Context("RayJob with different submission modes", func() {
19651966
19661967 By ("RayJobs's JobDeploymentStatus transitions from Running to Complete." , func () {
19671968 // Update fake dashboard client to return job info with "Failed" status.
1968- getJobInfo := func (context.Context , string ) (* utils .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1969- return & utils .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
1969+ getJobInfo := func (context.Context , string ) (* utiltypes .RayJobInfo , error ) { //nolint:unparam // This is a mock function so parameters are required
1970+ return & utiltypes .RayJobInfo {JobStatus : rayv1 .JobStatusFailed , EndTime : uint64 (time .Now ().UnixMilli ())}, nil
19701971 }
19711972 fakeRayDashboardClient .GetJobInfoMock .Store (& getJobInfo )
19721973 defer fakeRayDashboardClient .GetJobInfoMock .Store (nil )
0 commit comments