Skip to content

Commit

Permalink
Revert "Separate e2e tests by etna activation (#3268)"
Browse files Browse the repository at this point in the history
This reverts commit ec8a639.

Now that etna is released, there is no need for separate e2e jobs that
test pre- and post-etna behavior.
  • Loading branch information
marun committed Dec 20, 2024
1 parent a69772f commit 41d1f0d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 97 deletions.
25 changes: 2 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: fuzz_test
shell: bash
run: ./scripts/build_fuzz.sh 10 # Run each fuzz test 10 seconds
e2e_pre_etna:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -66,28 +66,7 @@ jobs:
uses: ./.github/actions/upload-tmpnet-artifact
if: always()
with:
name: e2e-pre-etna-tmpnet-data
e2e_post_etna:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go-for-project
- name: Build AvalancheGo Binary
shell: bash
run: ./scripts/build.sh -r
- name: Run e2e tests
uses: ./.github/actions/run-monitored-tmpnet-cmd
with:
run: E2E_SERIAL=1 ./scripts/tests.e2e.sh --delay-network-shutdown --activate-etna
prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }}
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
loki_id: ${{ secrets.LOKI_ID || '' }}
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
- name: Upload tmpnet network dir
uses: ./.github/actions/upload-tmpnet-artifact
if: always()
with:
name: e2e-post-etna-tmpnet-data
name: e2e-tmpnet-data
e2e_existing_network:
runs-on: ubuntu-latest
steps:
Expand Down
27 changes: 2 additions & 25 deletions tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,21 @@
package e2e_test

import (
"encoding/base64"
"encoding/json"
"testing"

"github.com/onsi/ginkgo/v2"
"github.com/stretchr/testify/require"

// ensure test packages are scanned by ginkgo
_ "github.com/ava-labs/avalanchego/tests/e2e/banff"
_ "github.com/ava-labs/avalanchego/tests/e2e/c"
_ "github.com/ava-labs/avalanchego/tests/e2e/etna"
_ "github.com/ava-labs/avalanchego/tests/e2e/faultinjection"
_ "github.com/ava-labs/avalanchego/tests/e2e/p"
_ "github.com/ava-labs/avalanchego/tests/e2e/x"
_ "github.com/ava-labs/avalanchego/tests/e2e/x/transfer"

"github.com/ava-labs/avalanchego/config"
"github.com/ava-labs/avalanchego/tests/e2e/vms"
"github.com/ava-labs/avalanchego/tests/fixture/e2e"
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
"github.com/ava-labs/avalanchego/upgrade"
)

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

tc := e2e.NewTestContext()

nodes := tmpnet.NewNodesOrPanic(flagVars.NodeCount())
subnets := vms.XSVMSubnetsOrPanic(nodes...)

upgrades := upgrade.Default
if flagVars.ActivateEtna() {
upgrades.EtnaTime = upgrade.InitiallyActiveTime
} else {
upgrades.EtnaTime = upgrade.UnscheduledActivationTime
}

upgradeJSON, err := json.Marshal(upgrades)
require.NoError(tc, err)

upgradeBase64 := base64.StdEncoding.EncodeToString(upgradeJSON)
return e2e.NewTestEnvironment(
tc,
e2e.NewTestContext(),
flagVars,
&tmpnet.Network{
Owner: "avalanchego-e2e",
DefaultFlags: tmpnet.FlagsMap{
config.UpgradeFileContentKey: upgradeBase64,
},
Owner: "avalanchego-e2e",
Nodes: nodes,
Subnets: subnets,
},
Expand Down
38 changes: 0 additions & 38 deletions tests/e2e/etna/suites.go

This file was deleted.

11 changes: 0 additions & 11 deletions tests/fixture/e2e/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type FlagVars struct {
stopNetwork bool
restartNetwork bool
nodeCount int
activateEtna bool
}

func (v *FlagVars) AvalancheGoExecPath() string {
Expand Down Expand Up @@ -75,10 +74,6 @@ func (v *FlagVars) NodeCount() int {
return v.nodeCount
}

func (v *FlagVars) ActivateEtna() bool {
return v.activateEtna
}

func getEnvWithDefault(envVar, defaultVal string) string {
val := os.Getenv(envVar)
if len(val) == 0 {
Expand Down Expand Up @@ -149,12 +144,6 @@ func RegisterFlags() *FlagVars {
tmpnet.DefaultNodeCount,
"number of nodes the network should initially consist of",
)
flag.BoolVar(
&vars.activateEtna,
"activate-etna",
false,
"[optional] activate the etna upgrade",
)

return &vars
}

0 comments on commit 41d1f0d

Please sign in to comment.