mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-09 22:47:24 +00:00
e2e: skip assertions for stateless nodes (#6894)
This commit is contained in:
@@ -17,9 +17,6 @@ import (
|
||||
// Tests that any initial state given in genesis has made it into the app.
|
||||
func TestApp_InitialState(t *testing.T) {
|
||||
testNode(t, func(t *testing.T, node e2e.Node) {
|
||||
if node.Stateless() {
|
||||
return
|
||||
}
|
||||
if len(node.Testnet.InitialState) == 0 {
|
||||
return
|
||||
}
|
||||
@@ -39,10 +36,6 @@ func TestApp_InitialState(t *testing.T) {
|
||||
// block and the node sync status.
|
||||
func TestApp_Hash(t *testing.T) {
|
||||
testNode(t, func(t *testing.T, node e2e.Node) {
|
||||
if node.Mode == e2e.ModeSeed {
|
||||
return
|
||||
}
|
||||
|
||||
client, err := node.Client()
|
||||
require.NoError(t, err)
|
||||
info, err := client.ABCIInfo(ctx)
|
||||
@@ -64,10 +57,6 @@ func TestApp_Hash(t *testing.T) {
|
||||
// Tests that we can set a value and retrieve it.
|
||||
func TestApp_Tx(t *testing.T) {
|
||||
testNode(t, func(t *testing.T, node e2e.Node) {
|
||||
if node.Mode == e2e.ModeSeed {
|
||||
return
|
||||
}
|
||||
|
||||
client, err := node.Client()
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -104,6 +93,5 @@ func TestApp_Tx(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, key, string(abciResp.Response.Key))
|
||||
assert.Equal(t, value, string(abciResp.Response.Value))
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -13,10 +13,6 @@ import (
|
||||
func TestBlock_Header(t *testing.T) {
|
||||
blocks := fetchBlockChain(t)
|
||||
testNode(t, func(t *testing.T, node e2e.Node) {
|
||||
if node.Mode == e2e.ModeSeed {
|
||||
return
|
||||
}
|
||||
|
||||
client, err := node.Client()
|
||||
require.NoError(t, err)
|
||||
status, err := client.Status(ctx)
|
||||
@@ -55,10 +51,6 @@ func TestBlock_Header(t *testing.T) {
|
||||
// Tests that the node contains the expected block range.
|
||||
func TestBlock_Range(t *testing.T) {
|
||||
testNode(t, func(t *testing.T, node e2e.Node) {
|
||||
if node.Mode == e2e.ModeSeed {
|
||||
return
|
||||
}
|
||||
|
||||
client, err := node.Client()
|
||||
require.NoError(t, err)
|
||||
status, err := client.Status(ctx)
|
||||
|
||||
@@ -30,8 +30,9 @@ var (
|
||||
blocksCacheMtx = sync.Mutex{}
|
||||
)
|
||||
|
||||
// testNode runs tests for testnet nodes. The callback function is given a
|
||||
// single node to test, running as a subtest in parallel with other subtests.
|
||||
// testNode runs tests for testnet nodes. The callback function is
|
||||
// given a single stateful node to test, running as a subtest in
|
||||
// parallel with other subtests.
|
||||
//
|
||||
// The testnet manifest must be given as the envvar E2E_MANIFEST. If not set,
|
||||
// these tests are skipped so that they're not picked up during normal unit
|
||||
@@ -51,6 +52,11 @@ func testNode(t *testing.T, testFunc func(*testing.T, e2e.Node)) {
|
||||
|
||||
for _, node := range nodes {
|
||||
node := *node
|
||||
|
||||
if node.Stateless() {
|
||||
continue
|
||||
}
|
||||
|
||||
t.Run(node.Name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
testFunc(t, node)
|
||||
|
||||
@@ -14,11 +14,6 @@ func TestNet_Peers(t *testing.T) {
|
||||
t.SkipNow()
|
||||
|
||||
testNode(t, func(t *testing.T, node e2e.Node) {
|
||||
// Seed nodes shouldn't necessarily mesh with the entire network.
|
||||
if node.Mode == e2e.ModeSeed {
|
||||
return
|
||||
}
|
||||
|
||||
client, err := node.Client()
|
||||
require.NoError(t, err)
|
||||
netInfo, err := client.NetInfo(ctx)
|
||||
|
||||
@@ -14,10 +14,6 @@ import (
|
||||
// scheduled validator updates.
|
||||
func TestValidator_Sets(t *testing.T) {
|
||||
testNode(t, func(t *testing.T, node e2e.Node) {
|
||||
if node.Mode == e2e.ModeSeed {
|
||||
return
|
||||
}
|
||||
|
||||
client, err := node.Client()
|
||||
require.NoError(t, err)
|
||||
status, err := client.Status(ctx)
|
||||
|
||||
Reference in New Issue
Block a user