mirror of
https://github.com/openfaas/faas.git
synced 2025-06-10 17:26:47 +00:00
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:
parent
bbbb4b536a
commit
5e0569f75a
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user