@@ -20,16 +20,13 @@ import (
2020 "testing"
2121
2222 . "github.com/onsi/gomega"
23- gomega "github.com/onsi/gomega"
2423 . "github.com/project-codeflare/codeflare-common/support"
2524 rayv1 "github.com/ray-project/kuberay/ray-operator/apis/ray/v1"
2625
27- corev1 "k8s.io/api/core/v1"
2826 rbacv1 "k8s.io/api/rbac/v1"
29- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3027)
3128
32- func TestMCADRay (t * testing.T ) {
29+ func TestRay (t * testing.T ) {
3330 test := With (t )
3431
3532 // Create a namespace
@@ -85,7 +82,7 @@ func TestMCADRay(t *testing.T) {
8582 createNotebook (test , namespace , token , config .Name , jupyterNotebookConfigMapFileName )
8683
8784 // Make sure the RayCluster is created and running
88- test .Eventually (rayClusters (test , namespace ), TestTimeoutLong ).
85+ test .Eventually (RayClusters (test , namespace . Name ), TestTimeoutLong ).
8986 Should (
9087 And (
9188 HaveLen (1 ),
@@ -94,7 +91,7 @@ func TestMCADRay(t *testing.T) {
9491 )
9592
9693 // Make sure the RayCluster finishes and is deleted
97- test .Eventually (rayClusters (test , namespace ), TestTimeoutLong ).
94+ test .Eventually (RayClusters (test , namespace . Name ), TestTimeoutLong ).
9895 Should (HaveLen (0 ))
9996}
10097
@@ -130,18 +127,3 @@ func readMnistPy(test Test) []byte {
130127
131128 return ParseTemplate (test , template , props )
132129}
133-
134- // TODO: This belongs on codeflare-common/support/ray.go
135- func rayClusters (t Test , namespace * corev1.Namespace ) func (g gomega.Gomega ) []* rayv1.RayCluster {
136- return func (g gomega.Gomega ) []* rayv1.RayCluster {
137- rcs , err := t .Client ().Ray ().RayV1 ().RayClusters (namespace .Name ).List (t .Ctx (), metav1.ListOptions {})
138- g .Expect (err ).NotTo (gomega .HaveOccurred ())
139-
140- rcsp := []* rayv1.RayCluster {}
141- for _ , v := range rcs .Items {
142- rcsp = append (rcsp , & v )
143- }
144-
145- return rcsp
146- }
147- }
0 commit comments