Browse Source

迁移test

pull/103/head
lixiaoshuang 4 years ago
parent
commit
0f68545ba9
  1. 13
      test/api_http_test.go
  2. 6
      test/api_test.go

13
test/api_http_test.go

@ -1,13 +0,0 @@
package test
import (
"github.com/stretchr/testify/assert"
"github.com/yedf/dtm/dtmcli/dtmimp"
"testing"
)
func TestDtmMetrics(t *testing.T) {
rest, err := dtmimp.RestyClient.R().Get("http://localhost:36789/api/metrics")
assert.Nil(t, err)
assert.Equal(t, rest.StatusCode(), 200)
}

6
test/api_test.go

@ -73,3 +73,9 @@ func TestAPIAll(t *testing.T) {
nextPos3 := m["next_position"].(string)
assert.Equal(t, "", nextPos3)
}
func TestDtmMetrics(t *testing.T) {
rest, err := dtmimp.RestyClient.R().Get("http://localhost:36789/api/metrics")
assert.Nil(t, err)
assert.Equal(t, rest.StatusCode(), 200)
}

Loading…
Cancel
Save