Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
golangapiserver: Actually test detach policy endpoint (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
silvestre authored Feb 13, 2020
1 parent c654d32 commit e3fddcb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/autoscaler/api/publicapiserver/public_api_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ var _ = Describe("PublicApiServer", func() {
})
It("should succeed", func() {
verifyResponse(httpClient, serverUrl, "/v1/apps/"+TEST_APP_ID+"/policy",
map[string]string{"Authorization": TEST_USER_TOKEN}, http.MethodPut, policy, http.StatusOK)
map[string]string{"Authorization": TEST_USER_TOKEN}, http.MethodDelete, policy, http.StatusOK)
})
})

Expand Down Expand Up @@ -424,9 +424,9 @@ func verifyResponse(httpClient *http.Client, serverUrl *url.URL, path string, he
req.Header.Set(headerName, headerValue)
}
}
Expect(err).NotTo(HaveOccurred())
ExpectWithOffset(1, err).NotTo(HaveOccurred())
rsp, err := httpClient.Do(req)
Expect(err).NotTo(HaveOccurred())
Expect(rsp.StatusCode).To(Equal(expectResponseStatusCode))
ExpectWithOffset(1, err).NotTo(HaveOccurred())
ExpectWithOffset(1, rsp.StatusCode).To(Equal(expectResponseStatusCode))

}

0 comments on commit e3fddcb

Please sign in to comment.