Skip to content

Commit

Permalink
code-hygiene: Fix use of subtests in node integration tests (cosmos#1071
Browse files Browse the repository at this point in the history
)

<!--
Please read and fill out this form before submitting your PR.

Please make sure you have reviewed our contributors guide before
submitting your
first PR.
-->

## Overview

<!-- 
Please provide an explanation of the PR, including the appropriate
context,
background, goal, and rationale. If there is an issue with this
information,
please provide a tl;dr and link the issue. 
-->

Closes cosmos#1070 

## Checklist

<!-- 
Please complete the checklist to ensure that the PR is ready to be
reviewed.

IMPORTANT:
PRs should be left in Draft until the below checklist is completed.
-->

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [x] Linked issues closed with keywords
  • Loading branch information
MSevey authored Jul 13, 2023
1 parent a9cd50d commit 1cac0c1
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions node/full_node_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,28 @@ func TestLazyAggregator(t *testing.T) {
}

func TestBlockExchange(t *testing.T) {
testSingleAggregatorSingleFullNode(t, true)
testSingleAggregatorTwoFullNode(t, true)
testSingleAggregatorSingleFullNodeTrustedHash(t, true)
t.Run("SingleAggregatorSingleFullNode", func(t *testing.T) {
testSingleAggregatorSingleFullNode(t, true)
})
t.Run("SingleAggregatorSingleFullNode", func(t *testing.T) {
testSingleAggregatorTwoFullNode(t, true)
})
t.Run("SingleAggregatorSingleFullNode", func(t *testing.T) {
testSingleAggregatorSingleFullNodeTrustedHash(t, true)
})
}

func TestHeaderExchange(t *testing.T) {
testSingleAggregatorSingleFullNode(t, false)
testSingleAggregatorTwoFullNode(t, false)
testSingleAggregatorSingleFullNodeTrustedHash(t, false)
testSingleAggregatorSingleFullNodeSingleLightNode(t)
t.Run("SingleAggregatorSingleFullNode", func(t *testing.T) {
testSingleAggregatorSingleFullNode(t, false)
})
t.Run("SingleAggregatorTwoFullNode", func(t *testing.T) {
testSingleAggregatorTwoFullNode(t, false)
})
t.Run("SingleAggregatorSingleFullNodeTrustedHash", func(t *testing.T) {
testSingleAggregatorSingleFullNodeTrustedHash(t, false)
})
t.Run("SingleAggregatorSingleFullNodeSingleLightNode", testSingleAggregatorSingleFullNodeSingleLightNode)
}

func testSingleAggregatorSingleFullNode(t *testing.T, useBlockExchange bool) {
Expand Down Expand Up @@ -446,8 +458,8 @@ func testSingleAggregatorTwoFullNodeFraudProofSync(t *testing.T) {
}

func TestFraudProofService(t *testing.T) {
testSingleAggregatorSingleFullNodeFraudProofGossip(t)
testSingleAggregatorTwoFullNodeFraudProofSync(t)
t.Run("SingleAggregatorSingleFullNodeFraudProofGossip", testSingleAggregatorSingleFullNodeFraudProofGossip)
t.Run("SingleAggregatorTwoFullNodeFraudProofSync", testSingleAggregatorTwoFullNodeFraudProofSync)
}

// Creates a starts the given number of client nodes along with an aggregator node. Uses the given flag to decide whether to have the aggregator produce malicious blocks.
Expand Down

0 comments on commit 1cac0c1

Please sign in to comment.