mirror of https://github.com/dtm-labs/dtm.git
1 changed files with 1 additions and 7 deletions
@ -1,18 +1,12 @@ |
|||||
package dtmsvr |
package test |
||||
|
|
||||
import ( |
import ( |
||||
"github.com/stretchr/testify/assert" |
"github.com/stretchr/testify/assert" |
||||
"github.com/yedf/dtm/common" |
|
||||
"github.com/yedf/dtm/dtmcli" |
|
||||
"github.com/yedf/dtm/dtmcli/dtmimp" |
"github.com/yedf/dtm/dtmcli/dtmimp" |
||||
"testing" |
"testing" |
||||
) |
) |
||||
|
|
||||
func TestDtmMetrics(t *testing.T) { |
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") |
rest, err := dtmimp.RestyClient.R().Get("http://localhost:36789/api/metrics") |
||||
assert.Nil(t, err) |
assert.Nil(t, err) |
||||
assert.Equal(t, rest.StatusCode(), 200) |
assert.Equal(t, rest.StatusCode(), 200) |
||||
Loading…
Reference in new issue