From 746f082bd6460528b91a22f53902e8601fd53409 Mon Sep 17 00:00:00 2001 From: Georgi Sabev Date: Tue, 14 Nov 2023 09:42:42 +0000 Subject: [PATCH] Check the HTTP status code when restarting the app Thus we ensure that the restart request succeeds Co-authored-by: Danail Branekov --- tests/e2e/apps_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/e2e/apps_test.go b/tests/e2e/apps_test.go index e33266f16..7285f2f53 100644 --- a/tests/e2e/apps_test.go +++ b/tests/e2e/apps_test.go @@ -605,8 +605,11 @@ var _ = Describe("Apps", func() { secondServiceInstanceGUID = createServiceInstance(space1GUID, generateGUID("service-instance"), moreCredentials) bindingName = "custom-named-binding" namedBindingGUID = createServiceBinding(appGUID, secondServiceInstanceGUID, bindingName) - _, httpError = adminClient.R().SetResult(&result).Post("/v3/apps/" + appGUID + "/actions/restart") + + var httpResp *resty.Response + httpResp, httpError = adminClient.R().SetResult(&result).Post("/v3/apps/" + appGUID + "/actions/restart") Expect(httpError).NotTo(HaveOccurred()) + Expect(httpResp).To(HaveRestyStatusCode(http.StatusOK)) }) It("sets the $SERVICE_BINDING_ROOT env variable", func() {