diff --git a/app/proxy/health_test.go b/app/proxy/health_test.go index 398d4e7..2b8a296 100644 --- a/app/proxy/health_test.go +++ b/app/proxy/health_test.go @@ -17,6 +17,7 @@ import ( "github.com/umputun/reproxy/app/discovery" "github.com/umputun/reproxy/app/discovery/provider" + "github.com/umputun/reproxy/app/mgmt" ) func TestHttp_healthHandler(t *testing.T) { @@ -54,6 +55,7 @@ func TestHttp_healthHandler(t *testing.T) { }() h.Matcher = svc + h.Metrics = mgmt.NewMetrics() go func() { _ = h.Run(ctx) }() @@ -95,6 +97,8 @@ func TestHttp_pingHandler(t *testing.T) { }() h.Matcher = svc + h.Metrics = mgmt.NewMetrics() + go func() { _ = h.Run(ctx) }() diff --git a/app/proxy/proxy_test.go b/app/proxy/proxy_test.go index be622ae..e2b81cc 100644 --- a/app/proxy/proxy_test.go +++ b/app/proxy/proxy_test.go @@ -16,6 +16,7 @@ import ( "github.com/umputun/reproxy/app/discovery" "github.com/umputun/reproxy/app/discovery/provider" + "github.com/umputun/reproxy/app/mgmt" ) func TestHttp_Do(t *testing.T) { @@ -45,6 +46,8 @@ func TestHttp_Do(t *testing.T) { time.Sleep(50 * time.Millisecond) h.Matcher = svc + h.Metrics = mgmt.NewMetrics() + go func() { _ = h.Run(ctx) }() @@ -119,6 +122,8 @@ func TestHttp_DoWithAssets(t *testing.T) { }() time.Sleep(50 * time.Millisecond) h.Matcher = svc + h.Metrics = mgmt.NewMetrics() + go func() { _ = h.Run(ctx) }() @@ -185,6 +190,8 @@ func TestHttp_DoWithAssetRules(t *testing.T) { }() time.Sleep(50 * time.Millisecond) h.Matcher = svc + h.Metrics = mgmt.NewMetrics() + go func() { _ = h.Run(ctx) }()