MCPcopy Create free account
hub / github.com/DOSNetwork/core / TestOnChainUpdate

Function TestOnChainUpdate

configuration/config_test.go:40–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38}
39
40func TestOnChainUpdate(t *testing.T) {
41 config := OnChainConfig{}
42 os.Setenv("CONFIGPATH", "..")
43 os.Setenv("CHAINNODE", "rinkebyPrivateNode")
44 config.LoadConfig()
45 chainConfig := config.GetChainConfig()
46 chainConfig.DOSAddressBridgeAddress = "0x12345"
47 config.UpdateConfig(chainConfig)
48
49 config.LoadConfig()
50 chainConfig = config.GetChainConfig()
51 actualResult := config.GetChainConfig().DOSAddressBridgeAddress
52 expectedResult := "0x12345"
53
54 require.Equal(t, expectedResult, actualResult)
55}

Callers

nothing calls this directly

Calls 3

LoadConfigMethod · 0.80
UpdateConfigMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected