Binance: Subscribe/unsubscribe response handling (#1444)

* Binance: Fix subscription failures ignored

* Testing: Fix race on shared config singleton

* Config: Privatise Global config var

We should *either* use a private var *or* use an accessor, but it
doesn't make sense to mix paradigms.
Since GetConfig() is well established this instead removes the limited uses of direct public access and adds a Setter

* Zip: Fix test failure on http mocks
This commit is contained in:
Gareth Kirwan
2024-02-02 09:27:17 +01:00
committed by GitHub
parent e16ee53746
commit 68a6f5828f
12 changed files with 192 additions and 183 deletions

View File

@@ -22,7 +22,7 @@ import (
// TestInstance takes an empty exchange instance and loads config for it from testdata/configtest and connects a NewTestWebsocket
func TestInstance(e exchange.IBotExchange) error {
cfg := config.GetConfig()
cfg := &config.Config{}
err := cfg.LoadConfig("../../testdata/configtest.json", true)
if err != nil {
return fmt.Errorf("LoadConfig() error: %w", err)