@@ -61,7 +61,7 @@ func TestAPIs(t *testing.T) {
6161
6262const (
6363 RayClusterCRDFileDownload = "https://raw.githubusercontent.com/ray-project/kuberay/master/ray-operator/config/crd/bases/ray.io_rayclusters.yaml"
64- RouteCRDFileDownload = "https://raw.githubusercontent.com/openshift/api/master/route/v1/zz_generated.crd-manifests/routes-Default .crd.yaml"
64+ RouteCRDFileDownload = "https://raw.githubusercontent.com/openshift/api/master/route/v1/zz_generated.crd-manifests/routes.crd.yaml"
6565)
6666
6767var _ = BeforeSuite (func () {
@@ -79,13 +79,17 @@ var _ = BeforeSuite(func() {
7979 defer fRoute .Close ()
8080 resp , err := http .Get (RouteCRDFileDownload )
8181 Expect (err ).ToNot (HaveOccurred ())
82+ Expect (resp .StatusCode ).To (Equal (http .StatusOK ), "Failed to download Route CRD: %s" , RouteCRDFileDownload )
83+ defer resp .Body .Close ()
8284 _ , err = io .Copy (fRoute , resp .Body )
8385 Expect (err ).ToNot (HaveOccurred ())
8486 fRaycluster , err = os .Create ("./test-crds/raycluster.yaml" )
8587 Expect (err ).ToNot (HaveOccurred ())
8688 defer fRaycluster .Close ()
8789 resp , err = http .Get (RayClusterCRDFileDownload )
8890 Expect (err ).ToNot (HaveOccurred ())
91+ Expect (resp .StatusCode ).To (Equal (http .StatusOK ), "Failed to download RayCluster CRD: %s" , RayClusterCRDFileDownload )
92+ defer resp .Body .Close ()
8993 _ , err = io .Copy (fRaycluster , resp .Body )
9094 Expect (err ).ToNot (HaveOccurred ())
9195
0 commit comments