From 5c019cd092698ca7aa0582e08708e959e2804085 Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Thu, 23 Apr 2020 14:03:49 +0200 Subject: [PATCH] test/helpers: mark TestRoute() as a helper function This makes the calling function/location appear when a test fails. --- internal/test/helpers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/test/helpers.go b/internal/test/helpers.go index 41fcb0e1a..cf9ccffb9 100644 --- a/internal/test/helpers.go +++ b/internal/test/helpers.go @@ -101,6 +101,8 @@ func dropFields(obj interface{}, fields ...string) { } func TestRoute(t *testing.T, api API, external bool, method, path, body string, expectedStatus int, expectedJSON string, ignoreFields ...string) { + t.Helper() + resp := SendHTTP(api, external, method, path, body) if resp == nil { t.Skip("This test is for internal testing only")