mirror of
https://github.com/umputun/reproxy.git
synced 2025-07-12 22:20:55 +02: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"
|
||||||
"github.com/umputun/reproxy/app/discovery/provider"
|
"github.com/umputun/reproxy/app/discovery/provider"
|
||||||
|
"github.com/umputun/reproxy/app/mgmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHttp_healthHandler(t *testing.T) {
|
func TestHttp_healthHandler(t *testing.T) {
|
||||||
@ -54,6 +55,7 @@ func TestHttp_healthHandler(t *testing.T) {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
h.Matcher = svc
|
h.Matcher = svc
|
||||||
|
h.Metrics = mgmt.NewMetrics()
|
||||||
go func() {
|
go func() {
|
||||||
_ = h.Run(ctx)
|
_ = h.Run(ctx)
|
||||||
}()
|
}()
|
||||||
@ -95,6 +97,8 @@ func TestHttp_pingHandler(t *testing.T) {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
h.Matcher = svc
|
h.Matcher = svc
|
||||||
|
h.Metrics = mgmt.NewMetrics()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
_ = h.Run(ctx)
|
_ = h.Run(ctx)
|
||||||
}()
|
}()
|
||||||
|
@ -16,6 +16,7 @@ import (
|
|||||||
|
|
||||||
"github.com/umputun/reproxy/app/discovery"
|
"github.com/umputun/reproxy/app/discovery"
|
||||||
"github.com/umputun/reproxy/app/discovery/provider"
|
"github.com/umputun/reproxy/app/discovery/provider"
|
||||||
|
"github.com/umputun/reproxy/app/mgmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHttp_Do(t *testing.T) {
|
func TestHttp_Do(t *testing.T) {
|
||||||
@ -45,6 +46,8 @@ func TestHttp_Do(t *testing.T) {
|
|||||||
|
|
||||||
time.Sleep(50 * time.Millisecond)
|
time.Sleep(50 * time.Millisecond)
|
||||||
h.Matcher = svc
|
h.Matcher = svc
|
||||||
|
h.Metrics = mgmt.NewMetrics()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
_ = h.Run(ctx)
|
_ = h.Run(ctx)
|
||||||
}()
|
}()
|
||||||
@ -119,6 +122,8 @@ func TestHttp_DoWithAssets(t *testing.T) {
|
|||||||
}()
|
}()
|
||||||
time.Sleep(50 * time.Millisecond)
|
time.Sleep(50 * time.Millisecond)
|
||||||
h.Matcher = svc
|
h.Matcher = svc
|
||||||
|
h.Metrics = mgmt.NewMetrics()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
_ = h.Run(ctx)
|
_ = h.Run(ctx)
|
||||||
}()
|
}()
|
||||||
@ -185,6 +190,8 @@ func TestHttp_DoWithAssetRules(t *testing.T) {
|
|||||||
}()
|
}()
|
||||||
time.Sleep(50 * time.Millisecond)
|
time.Sleep(50 * time.Millisecond)
|
||||||
h.Matcher = svc
|
h.Matcher = svc
|
||||||
|
h.Metrics = mgmt.NewMetrics()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
_ = h.Run(ctx)
|
_ = h.Run(ctx)
|
||||||
}()
|
}()
|
||||||
|
Reference in New Issue
Block a user