fix tests regression

This commit is contained in:
Umputun
2021-04-20 19:09:51 -05:00
parent f47b16e426
commit aef3040b60
2 changed files with 11 additions and 0 deletions

View File

@@ -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)
}()

View File

@@ -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)
}()