Skip to content

Commit 362e2e5

Browse files
Merge pull request #685 from laurafitzgerald/unit-test-route-fix
update route link as previous file was removed
2 parents 35e76cb + d2d22ed commit 362e2e5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/controllers/suite_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestAPIs(t *testing.T) {
6161

6262
const (
6363
RayClusterCRDFileDownload = "https://github.com/raw/ray-project/kuberay/master/ray-operator/config/crd/bases/ray.io_rayclusters.yaml"
64-
RouteCRDFileDownload = "https://github.com/raw/openshift/api/master/route/v1/zz_generated.crd-manifests/routes-Default.crd.yaml"
64+
RouteCRDFileDownload = "https://github.com/raw/openshift/api/master/route/v1/zz_generated.crd-manifests/routes.crd.yaml"
6565
)
6666

6767
var _ = 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

Comments
 (0)