mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-27 18:57:04 +02:00
fix(test): correct test expectations and logic
Httptest and similar callers often leave Host unset; fall back to URL for scheme, host, port, and addr substitution. jsonstore drops the IsTest load short-circuit and duplicate loadNS map registration; tests isolate storesPath. Skip MaxMind background updates when IsTest. Tests restore APISkipOriginCheck, use app-scoped OIDC state cookies, attach route context in middleware helpers, and use locked buffers for concurrent log capture.
This commit is contained in:
@@ -42,7 +42,8 @@ func TestWithConsumedRouteOverlaysReturnsNewRequestWhenOverlayIsPresent(t *testi
|
||||
}
|
||||
|
||||
type fakeMiddlewareHTTPRoute struct {
|
||||
name string
|
||||
name string
|
||||
targetURL *nettypes.URL
|
||||
}
|
||||
|
||||
func (r fakeMiddlewareHTTPRoute) Key() string { return r.name }
|
||||
@@ -54,7 +55,7 @@ func (r fakeMiddlewareHTTPRoute) MarshalZerologObject(*zerolog.Event) {}
|
||||
func (r fakeMiddlewareHTTPRoute) ProviderName() string { return "" }
|
||||
func (r fakeMiddlewareHTTPRoute) GetProvider() types.RouteProvider { return nil }
|
||||
func (r fakeMiddlewareHTTPRoute) ListenURL() *nettypes.URL { return nil }
|
||||
func (r fakeMiddlewareHTTPRoute) TargetURL() *nettypes.URL { return nil }
|
||||
func (r fakeMiddlewareHTTPRoute) TargetURL() *nettypes.URL { return r.targetURL }
|
||||
func (r fakeMiddlewareHTTPRoute) HealthMonitor() types.HealthMonitor { return nil }
|
||||
func (r fakeMiddlewareHTTPRoute) SetHealthMonitor(types.HealthMonitor) {}
|
||||
func (r fakeMiddlewareHTTPRoute) References() []string { return nil }
|
||||
|
||||
Reference in New Issue
Block a user