From e49a7c39dabaffdabc18a66c4b0f371bc84a6ca6 Mon Sep 17 00:00:00 2001 From: sinadarbouy Date: Sun, 14 Jul 2024 18:36:41 +0200 Subject: [PATCH] fixed tests to be compatible with multiple proxies --- api/api_helpers_test.go | 2 +- api/api_test.go | 2 +- api/healthcheck_test.go | 2 +- network/server_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/api_helpers_test.go b/api/api_helpers_test.go index 9e383333..1a015ce5 100644 --- a/api/api_helpers_test.go +++ b/api/api_helpers_test.go @@ -49,7 +49,7 @@ func getAPIConfig() *API { context.Background(), network.Server{ Logger: logger, - Proxy: defaultProxy, + Proxies: []network.IProxy{defaultProxy}, PluginRegistry: pluginReg, PluginTimeout: config.DefaultPluginTimeout, Network: "tcp", diff --git a/api/api_test.go b/api/api_test.go index 692a8d36..13048aac 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -333,7 +333,7 @@ func TestGetServers(t *testing.T) { Options: network.Option{ EnableTicker: false, }, - Proxy: proxy, + Proxies: []network.IProxy{proxy}, Logger: zerolog.Logger{}, PluginRegistry: pluginRegistry, PluginTimeout: config.DefaultPluginTimeout, diff --git a/api/healthcheck_test.go b/api/healthcheck_test.go index 2aa2a5ce..0efd03f1 100644 --- a/api/healthcheck_test.go +++ b/api/healthcheck_test.go @@ -69,7 +69,7 @@ func Test_Healthchecker(t *testing.T) { Options: network.Option{ EnableTicker: false, }, - Proxy: proxy, + Proxies: []network.IProxy{proxy}, Logger: zerolog.Logger{}, PluginRegistry: pluginRegistry, PluginTimeout: config.DefaultPluginTimeout, diff --git a/network/server_test.go b/network/server_test.go index b090e126..5c5293ac 100644 --- a/network/server_test.go +++ b/network/server_test.go @@ -114,7 +114,7 @@ func TestRunServer(t *testing.T) { Options: Option{ EnableTicker: true, }, - Proxy: proxy, + Proxies: []IProxy{proxy}, Logger: logger, PluginRegistry: pluginRegistry, PluginTimeout: config.DefaultPluginTimeout,