mirror of
https://github.com/kemko/reproxy.git
synced 2026-01-01 15:55:49 +03:00
fix tests regression
This commit is contained in:
@@ -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)
|
||||
}()
|
||||
|
||||
@@ -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)
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user