summaryrefslogtreecommitdiffstats
path: root/tests/integration/integration_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/integration_test.go')
-rw-r--r--tests/integration/integration_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go
index c904d32ffa..76a65e3f03 100644
--- a/tests/integration/integration_test.go
+++ b/tests/integration/integration_test.go
@@ -40,7 +40,7 @@ import (
"github.com/xeipuuv/gojsonschema"
)
-var c *web.Route
+var testWebRoutes *web.Route
type NilResponseRecorder struct {
httptest.ResponseRecorder
@@ -87,7 +87,7 @@ func TestMain(m *testing.M) {
defer cancel()
tests.InitTest(true)
- c = routers.NormalRoutes()
+ testWebRoutes = routers.NormalRoutes()
// integration test settings...
if setting.CfgProvider != nil {
@@ -374,7 +374,7 @@ func MakeRequest(t testing.TB, req *http.Request, expectedStatus int) *httptest.
if req.RemoteAddr == "" {
req.RemoteAddr = "test-mock:12345"
}
- c.ServeHTTP(recorder, req)
+ testWebRoutes.ServeHTTP(recorder, req)
if expectedStatus != NoExpectedStatus {
if !assert.EqualValues(t, expectedStatus, recorder.Code, "Request: %s %s", req.Method, req.URL.String()) {
logUnexpectedResponse(t, recorder)
@@ -386,7 +386,7 @@ func MakeRequest(t testing.TB, req *http.Request, expectedStatus int) *httptest.
func MakeRequestNilResponseRecorder(t testing.TB, req *http.Request, expectedStatus int) *NilResponseRecorder {
t.Helper()
recorder := NewNilResponseRecorder()
- c.ServeHTTP(recorder, req)
+ testWebRoutes.ServeHTTP(recorder, req)
if expectedStatus != NoExpectedStatus {
if !assert.EqualValues(t, expectedStatus, recorder.Code,
"Request: %s %s", req.Method, req.URL.String()) {
@@ -399,7 +399,7 @@ func MakeRequestNilResponseRecorder(t testing.TB, req *http.Request, expectedSta
func MakeRequestNilResponseHashSumRecorder(t testing.TB, req *http.Request, expectedStatus int) *NilResponseHashSumRecorder {
t.Helper()
recorder := NewNilResponseHashSumRecorder()
- c.ServeHTTP(recorder, req)
+ testWebRoutes.ServeHTTP(recorder, req)
if expectedStatus != NoExpectedStatus {
if !assert.EqualValues(t, expectedStatus, recorder.Code,
"Request: %s %s", req.Method, req.URL.String()) {