-
Notifications
You must be signed in to change notification settings - Fork 704
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate e2e tests by etna activation (#3268)
- Loading branch information
1 parent
7e985b5
commit ec8a639
Showing
4 changed files
with
99 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. | ||
// See the file LICENSE for licensing terms. | ||
|
||
// Implements tests for the etna network upgrade. | ||
package etna | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/ava-labs/avalanchego/api/info" | ||
"github.com/ava-labs/avalanchego/tests/fixture/e2e" | ||
|
||
ginkgo "github.com/onsi/ginkgo/v2" | ||
) | ||
|
||
var _ = ginkgo.Describe("[Etna]", func() { | ||
tc := e2e.NewTestContext() | ||
require := require.New(tc) | ||
|
||
ginkgo.It("can detect if Etna is activated", | ||
func() { | ||
env := e2e.GetEnv(tc) | ||
infoClient := info.NewClient(env.GetRandomNodeURI().URI) | ||
|
||
tc.By("get upgrade config") | ||
upgrades, err := infoClient.Upgrades(tc.DefaultContext()) | ||
require.NoError(err) | ||
|
||
now := time.Now() | ||
if !upgrades.IsEtnaActivated(now) { | ||
tc.Outf("{{green}}Etna is not activated{{/}}: %s (now) < %s (EtnaTime)\n", now, upgrades.EtnaTime) | ||
return | ||
} | ||
|
||
tc.Outf("{{green}}Etna is activated{{/}}: %s (now) >= %s (EtnaTime)\n", now, upgrades.EtnaTime) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters