Fix overriding network config in tests (#8756)

* Fix overriding network config in tests

* copy config in OverrideBeaconNetworkConfig

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
Radosław Kapka 2021-04-14 09:39:20 +02:00 committed by GitHub
parent 228033f7a3
commit 902e3f4f53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,10 +7,10 @@ import "testing"
func SetupTestConfigCleanup(t testing.TB) {
prevDefaultBeaconConfig := mainnetBeaconConfig.Copy()
prevBeaconConfig := beaconConfig.Copy()
prevNetworkCfg := mainnetNetworkConfig.Copy()
prevNetworkCfg := networkConfig.Copy()
t.Cleanup(func() {
mainnetBeaconConfig = prevDefaultBeaconConfig
beaconConfig = prevBeaconConfig
mainnetNetworkConfig = prevNetworkCfg
networkConfig = prevNetworkCfg
})
}