From 51dfcbed21c7d622dd71e3a44727464ca6c5a1e8 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 13 Nov 2020 10:48:55 +0100 Subject: [PATCH] fix routes register test --- routes/register_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/routes/register_test.go b/routes/register_test.go index e8a5445..4f76ba9 100644 --- a/routes/register_test.go +++ b/routes/register_test.go @@ -23,12 +23,13 @@ package routes import ( + "os" + "testing" + "git.rwth-aachen.de/acs/public/villas/web-backend-go/configuration" "git.rwth-aachen.de/acs/public/villas/web-backend-go/database" "github.com/gin-gonic/gin" "github.com/stretchr/testify/assert" - "os" - "testing" ) var router *gin.Engine @@ -59,6 +60,11 @@ func TestRegisterEndpoints(t *testing.T) { } func TestAddTestData(t *testing.T) { - resp, err := AddTestData("/api", router) + err := configuration.InitConfig() + if err != nil { + panic(t) + } + + resp, err := AddTestData(configuration.GolbalConfig, router) assert.NoError(t, err, "Response body: %v", resp) }