golang-lib/web/metrics/main_test.go

25 lines
431 B
Go
Raw Normal View History

2021-06-01 10:51:35 +02:00
package metrics
import (
"net/http"
"testing"
"github.com/stretchr/testify/assert"
"dev.sum7.eu/genofire/golang-lib/web/webtest"
)
func TestMetricsLoaded(t *testing.T) {
assert := assert.New(t)
s := webtest.New(assert)
assert.NotNil(s)
// GET
s.Request(http.MethodGet, "/metrics", nil, http.StatusOK, nil)
2021-06-23 13:42:42 +02:00
UP = func() bool { return false }
// GET
s.Request(http.MethodGet, "/metrics", nil, http.StatusOK, nil)
2021-06-01 10:51:35 +02:00
}