feat(unit-testing): add a mock for the RequestBouncer EE-5610 (#9089)

This commit is contained in:
andres-portainer
2023-06-16 10:44:22 -03:00
committed by GitHub
parent 933e764a13
commit f7dd73b0f7
42 changed files with 147 additions and 126 deletions

View File

@@ -13,13 +13,13 @@ import (
type Handler struct {
*mux.Router
DataStore dataservices.DataStore
requestBouncer *security.RequestBouncer
requestBouncer security.BouncerService
ProxyManager *proxy.Manager
ReverseTunnelService portainer.ReverseTunnelService
}
// NewHandler creates a handler to proxy requests to external APIs.
func NewHandler(bouncer *security.RequestBouncer) *Handler {
func NewHandler(bouncer security.BouncerService) *Handler {
h := &Handler{
Router: mux.NewRouter(),
requestBouncer: bouncer,