-
Notifications
You must be signed in to change notification settings - Fork 55
/
suite.go
43 lines (35 loc) · 1.34 KB
/
suite.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (C) 2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package subnet
import (
"github.com/ava-labs/avalanche-cli/tests/e2e/commands"
"github.com/ava-labs/avalanche-cli/tests/e2e/utils"
ginkgo "github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
)
const subnetName = "e2eSubnetTest"
var (
mapping map[string]string
err error
)
var _ = ginkgo.Describe("[Subnet]", ginkgo.Ordered, func() {
_ = ginkgo.BeforeAll(func() {
mapper := utils.NewVersionMapper()
mapping, err = utils.GetVersionMapping(mapper)
gomega.Expect(err).Should(gomega.BeNil())
})
ginkgo.It("can create and delete a subnet evm config", func() {
commands.CreateSubnetEvmConfig(subnetName, utils.SubnetEvmGenesisPath)
commands.DeleteSubnetConfig(subnetName)
})
ginkgo.It("can create and delete a custom vm subnet config", func() {
// let's use a SubnetEVM version which would be compatible with an existing Avago
customVMPath, err := utils.DownloadCustomVMBin(mapping[utils.SoloSubnetEVMKey1])
gomega.Expect(err).Should(gomega.BeNil())
commands.CreateCustomVMConfig(subnetName, utils.SubnetEvmGenesisPath, customVMPath)
commands.DeleteSubnetConfig(subnetName)
exists, err := utils.SubnetCustomVMExists(subnetName)
gomega.Expect(err).Should(gomega.BeNil())
gomega.Expect(exists).Should(gomega.BeFalse())
})
})