Update TestGet_Rejected

Get is a supported method so this test failed, I've now changed
this to an unsupported method - i.e. HEAD to trigger the error
and keep the test.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (VMware) 2018-03-29 10:14:19 +01:00 committed by Alex Ellis
parent bbbb4b536a
commit 5e0569f75a

View File

@ -49,7 +49,8 @@ func fireRequestWithHeaders(url string, method string, reqBody string, headers m
func TestGet_Rejected(t *testing.T) {
var reqBody string
_, code, err := fireRequest("http://localhost:8080/function/func_echoit", http.MethodGet, reqBody)
unsupportedMethod := http.MethodHead
_, code, err := fireRequest("http://localhost:8080/function/func_echoit", unsupportedMethod, reqBody)
want := http.StatusMethodNotAllowed
if code != want {
t.Logf("Failed got: %d, wanted: %d", code, want)