From 3e685aa39ef516a62c8c56b71e3938ebc93cfb26 Mon Sep 17 00:00:00 2001 From: lixiaoshuang <644968328@qq.com> Date: Mon, 20 Dec 2021 12:38:24 +0800 Subject: [PATCH] add test --- {dtmsvr => test}/api_http_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) rename {dtmsvr => test}/api_http_test.go (59%) diff --git a/dtmsvr/api_http_test.go b/test/api_http_test.go similarity index 59% rename from dtmsvr/api_http_test.go rename to test/api_http_test.go index 48ebb39..a545ba8 100644 --- a/dtmsvr/api_http_test.go +++ b/test/api_http_test.go @@ -1,18 +1,12 @@ -package dtmsvr +package test import ( "github.com/stretchr/testify/assert" - "github.com/yedf/dtm/common" - "github.com/yedf/dtm/dtmcli" "github.com/yedf/dtm/dtmcli/dtmimp" "testing" ) func TestDtmMetrics(t *testing.T) { - common.MustLoadConfig() - dtmcli.SetCurrentDBType(common.Config.ExamplesDB.Driver) - PopulateDB(true) - StartSvr() rest, err := dtmimp.RestyClient.R().Get("http://localhost:36789/api/metrics") assert.Nil(t, err) assert.Equal(t, rest.StatusCode(), 200)