fix: fix test path

This commit is contained in:
franklin 2021-09-14 09:21:40 +02:00
parent edc859fa1f
commit d0c8050e67
3 changed files with 9 additions and 10 deletions

View File

@ -9,20 +9,20 @@ import (
func main() {
// you can override the below config by settings env vars
_ = os.Setenv("SERVICE_ZAP_ENABLED", "false")
_ = os.Setenv("SERVICE_VIPER_ENABLED", "false")
_ = os.Setenv("SERVICE_PROMETHEUS_ENABLED", "false")
_ = os.Setenv("SERVICE_ZAP_ENABLED", "true")
_ = os.Setenv("SERVICE_VIPER_ENABLED", "true")
_ = os.Setenv("SERVICE_PROMETHEUS_ENABLED", "true")
svr := keel.NewServer(
// add zap service listening on localhost:9100
// allows you to view / change the log level: GET / PUT localhost:9100/log
keel.WithHTTPZapService(true),
keel.WithHTTPZapService(false),
// add viper service listening on localhost:9300
// allows you to view / change the configuration: GET / PUT localhost:9300/config
keel.WithHTTPViperService(true),
keel.WithHTTPViperService(false),
// add prometheus service listening on 0.0.0.0:9200
// allows you to collect prometheus metrics: GET 0.0.0.0:9200/metrics
keel.WithHTTPPrometheusService(true),
keel.WithHTTPPrometheusService(false),
)
l := svr.Logger()

3
go.mod
View File

@ -3,9 +3,9 @@ module github.com/foomo/keel
go 1.16
require (
github.com/davecgh/go-spew v1.1.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.1.2
github.com/mitchellh/mapstructure v1.1.2
github.com/nats-io/nats.go v1.12.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.10.0
@ -25,5 +25,4 @@ require (
go.uber.org/zap v1.16.0
golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
)

View File

@ -92,8 +92,8 @@ func (s *KeelTestSuite) TestServiceHTTPZap() {
}
s.svr.AddServices(
keel.NewServiceHTTPZap(s.l, "zap", ":9100", "log"),
keel.NewServiceHTTP(log.Logger(), "test", ":55000", s.mux),
keel.NewServiceHTTPZap(s.l, "zap", ":9100", "/log"),
keel.NewServiceHTTP(s.l, "test", ":55000", s.mux),
)
go s.svr.Run()