Skip to content

Commit

Permalink
fixup: Enable private network configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
marun committed Mar 12, 2024
1 parent bdbcaa2 commit dee877b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 4 additions & 1 deletion tests/e2e/c/dynamic_fees.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ var _ = e2e.DescribeCChain("[Dynamic Fees]", func() {

ginkgo.It("should ensure that the gas price is affected by load", func() {
ginkgo.By("creating a new private network to ensure isolation from other tests")
privateNetwork := e2e.Env.NewPrivateNetwork("avalanchego-e2e-dynamic-fees")
privateNetwork := &tmpnet.Network{
Owner: "avalanchego-e2e-dynamic-fees",
}
e2e.Env.NewPrivateNetwork(privateNetwork)

ginkgo.By("allocating a pre-funded key")
key := privateNetwork.PreFundedKeys[0]
Expand Down
7 changes: 1 addition & 6 deletions tests/fixture/e2e/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,22 +155,17 @@ func (te *TestEnvironment) NewKeychain(count int) *secp256k1fx.Keychain {
}

// Create a new private network that is not shared with other tests.
func (te *TestEnvironment) NewPrivateNetwork(networkOwner string) *tmpnet.Network {
func (te *TestEnvironment) NewPrivateNetwork(network *tmpnet.Network) {
// Use the same configuration as the shared network
sharedNetwork, err := tmpnet.ReadNetwork(te.NetworkDir)
te.require.NoError(err)

pluginDir, err := sharedNetwork.DefaultFlags.GetStringVal(config.PluginDirKey)
te.require.NoError(err)

network := &tmpnet.Network{
Owner: networkOwner,
}
StartNetwork(
network,
sharedNetwork.DefaultRuntimeConfig.AvalancheGoPath,
pluginDir,
)

return network
}

0 comments on commit dee877b

Please sign in to comment.