Skip to content

Commit 74fd07c

Browse files
maru-avatsachiherman
authored andcommitted
Update e2e tests and CI jobs for post-etna (#3614)
1 parent 5590050 commit 74fd07c

File tree

6 files changed

+4
-305
lines changed

6 files changed

+4
-305
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: fuzz_test
4747
shell: bash
4848
run: ./scripts/build_fuzz.sh 10 # Run each fuzz test 10 seconds
49-
e2e_pre_etna:
49+
e2e:
5050
runs-on: ubuntu-latest
5151
steps:
5252
- uses: actions/checkout@v4
@@ -66,28 +66,7 @@ jobs:
6666
uses: ./.github/actions/upload-tmpnet-artifact
6767
if: always()
6868
with:
69-
name: e2e-pre-etna-tmpnet-data
70-
e2e_post_etna:
71-
runs-on: ubuntu-latest
72-
steps:
73-
- uses: actions/checkout@v4
74-
- uses: ./.github/actions/setup-go-for-project
75-
- name: Build AvalancheGo Binary
76-
shell: bash
77-
run: ./scripts/build.sh -r
78-
- name: Run e2e tests
79-
uses: ./.github/actions/run-monitored-tmpnet-cmd
80-
with:
81-
run: E2E_SERIAL=1 ./scripts/tests.e2e.sh --delay-network-shutdown --activate-etna
82-
prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }}
83-
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
84-
loki_id: ${{ secrets.LOKI_ID || '' }}
85-
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
86-
- name: Upload tmpnet network dir
87-
uses: ./.github/actions/upload-tmpnet-artifact
88-
if: always()
89-
with:
90-
name: e2e-post-etna-tmpnet-data
69+
name: e2e-tmpnet-data
9170
e2e_existing_network:
9271
runs-on: ubuntu-latest
9372
steps:

tests/e2e/e2e_test.go

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,21 @@
44
package e2e_test
55

66
import (
7-
"encoding/base64"
8-
"encoding/json"
97
"testing"
108

119
"github.com/onsi/ginkgo/v2"
12-
"github.com/stretchr/testify/require"
1310

1411
// ensure test packages are scanned by ginkgo
1512
_ "github.com/ava-labs/avalanchego/tests/e2e/banff"
1613
_ "github.com/ava-labs/avalanchego/tests/e2e/c"
17-
_ "github.com/ava-labs/avalanchego/tests/e2e/etna"
1814
_ "github.com/ava-labs/avalanchego/tests/e2e/faultinjection"
1915
_ "github.com/ava-labs/avalanchego/tests/e2e/p"
2016
_ "github.com/ava-labs/avalanchego/tests/e2e/x"
2117
_ "github.com/ava-labs/avalanchego/tests/e2e/x/transfer"
2218

23-
"github.com/ava-labs/avalanchego/config"
2419
"github.com/ava-labs/avalanchego/tests/e2e/vms"
2520
"github.com/ava-labs/avalanchego/tests/fixture/e2e"
2621
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
27-
"github.com/ava-labs/avalanchego/upgrade"
2822
)
2923

3024
func TestE2E(t *testing.T) {
@@ -40,30 +34,13 @@ func init() {
4034
var _ = ginkgo.SynchronizedBeforeSuite(func() []byte {
4135
// Run only once in the first ginkgo process
4236

43-
tc := e2e.NewTestContext()
44-
4537
nodes := tmpnet.NewNodesOrPanic(flagVars.NodeCount())
4638
subnets := vms.XSVMSubnetsOrPanic(nodes...)
47-
48-
upgrades := upgrade.Default
49-
if flagVars.ActivateEtna() {
50-
upgrades.EtnaTime = upgrade.InitiallyActiveTime
51-
} else {
52-
upgrades.EtnaTime = upgrade.UnscheduledActivationTime
53-
}
54-
55-
upgradeJSON, err := json.Marshal(upgrades)
56-
require.NoError(tc, err)
57-
58-
upgradeBase64 := base64.StdEncoding.EncodeToString(upgradeJSON)
5939
return e2e.NewTestEnvironment(
60-
tc,
40+
e2e.NewTestContext(),
6141
flagVars,
6242
&tmpnet.Network{
63-
Owner: "avalanchego-e2e",
64-
DefaultFlags: tmpnet.FlagsMap{
65-
config.UpgradeFileContentKey: upgradeBase64,
66-
},
43+
Owner: "avalanchego-e2e",
6744
Nodes: nodes,
6845
Subnets: subnets,
6946
},

tests/e2e/etna/suites.go

Lines changed: 0 additions & 38 deletions
This file was deleted.

tests/e2e/p/elastic_subnets.go

Lines changed: 0 additions & 196 deletions
This file was deleted.

tests/e2e/p/l1.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"go.uber.org/zap"
1717
"google.golang.org/protobuf/proto"
1818

19-
"github.com/ava-labs/avalanchego/api/info"
2019
"github.com/ava-labs/avalanchego/config"
2120
"github.com/ava-labs/avalanchego/ids"
2221
"github.com/ava-labs/avalanchego/network/peer"
@@ -71,17 +70,6 @@ var _ = e2e.DescribePChain("[L1]", func() {
7170
env := e2e.GetEnv(tc)
7271
nodeURI := env.GetRandomNodeURI()
7372

74-
tc.By("verifying Etna is activated", func() {
75-
infoClient := info.NewClient(nodeURI.URI)
76-
upgrades, err := infoClient.Upgrades(tc.DefaultContext())
77-
require.NoError(err)
78-
79-
now := time.Now()
80-
if !upgrades.IsEtnaActivated(now) {
81-
ginkgo.Skip("Etna is not activated. L1s are enabled post-Etna, skipping test.")
82-
}
83-
})
84-
8573
tc.By("loading the wallet")
8674
var (
8775
keychain = env.NewKeychain()

tests/fixture/e2e/flags.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ type FlagVars struct {
2626
stopNetwork bool
2727
restartNetwork bool
2828
nodeCount int
29-
activateEtna bool
3029
}
3130

3231
func (v *FlagVars) AvalancheGoExecPath() string {
@@ -75,10 +74,6 @@ func (v *FlagVars) NodeCount() int {
7574
return v.nodeCount
7675
}
7776

78-
func (v *FlagVars) ActivateEtna() bool {
79-
return v.activateEtna
80-
}
81-
8277
func getEnvWithDefault(envVar, defaultVal string) string {
8378
val := os.Getenv(envVar)
8479
if len(val) == 0 {
@@ -149,12 +144,6 @@ func RegisterFlags() *FlagVars {
149144
tmpnet.DefaultNodeCount,
150145
"number of nodes the network should initially consist of",
151146
)
152-
flag.BoolVar(
153-
&vars.activateEtna,
154-
"activate-etna",
155-
false,
156-
"[optional] activate the etna upgrade",
157-
)
158147

159148
return &vars
160149
}

0 commit comments

Comments
 (0)