Since: 1138, } }) JustBeforeEach(func() { request = newTestRequest(requestBody) handler.FailActualLRP(responseRecorder, request) }) Context("when failing the actual lrp in the DB succeeds", func() { BeforeEach(func() { fakeActualLRPDB.FailActualLRPReturns(nil) }) It("fails the actual lrp by process guid and index", func() { Expect(fakeActualLRPDB.FailActualLRPCallCount()).To(Equal(1)) _, actualKey, actualErrorMessage := fakeActualLRPDB.FailActualLRPArgsForCall(0) Expect(*actualKey).To(Equal(key)) Expect(actualErrorMessage).To(Equal(errorMessage)) Expect(responseRecorder.Code).To(Equal(http.StatusOK)) response := &models.ActualLRPLifecycleResponse{} err := response.Unmarshal(responseRecorder.Body.Bytes()) Expect(err).NotTo(HaveOccurred()) Expect(response.Error).To(BeNil()) }) }) Context("when failing the actual lrp fails", func() {