Skip to content

Commit

Permalink
Merge branch 'masa/1178-happy-path-cleanup-continued' into ph/adjust-…
Browse files Browse the repository at this point in the history
…cometmock-integration-for-47-upgrade
  • Loading branch information
p-offtermatt committed Aug 3, 2023
2 parents e84cb5d + 31cceaa commit 1c0f3c4
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 12 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,31 @@ jobs:
run: make proto-check
- name: Unit, integration and difference tests
run: go test ./...
E2E_Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: E2E tests
run: make test-e2e-short
- name: E2E tests with CometMock
run: make test-e2e-short
Cometmock_Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: E2E tests
run: make test-e2e-short-cometmock
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ test-diff:
test-e2e-short:
go run ./tests/e2e/... --happy-path-only

test-e2e-cometmock:
# run only happy path E2E tests with cometmock
# this set of traces does not test equivocation but it does check downtime
test-e2e-short-cometmock:
go run ./tests/e2e/... --short-happy-path --use-cometmock --use-gorelayer

# run full E2E tests in sequence (including multiconsumer)
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ func (tr TestRun) assignConsumerPubKey(action assignConsumerPubKeyAction, verbos

if action.expectError {
if verbose {
fmt.Printf("got expected error during key assignment | err: %s \n", err.Error())
fmt.Printf("got expected error during key assignment | err: %s \n", err)
}
}

Expand Down
5 changes: 1 addition & 4 deletions tests/e2e/steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ var happyPathSteps = concatSteps(
stepsRedelegateForOptOut("consu"),
stepsDowntimeWithOptOut("consu"),
stepsRedelegate("consu"),
stepsDowntime("consu"),
stepsRejectEquivocationProposal("consu", 2), // prop to tombstone bob is rejected
stepsDoubleSignOnProviderAndConsumer("consu"), // carol double signs on provider, bob double signs on consumer
stepsSubmitEquivocationProposal("consu", 2), // now prop to tombstone bob is submitted and accepted
stepsStartRelayer(),
stepsConsumerRemovalPropNotPassing("consu", 3), // submit removal prop but vote no on it - chain should stay
stepsStopChain("consu", 4), // stop chain
stepsStopChain("consu", 3), // stop chain
)

var shortHappyPathSteps = concatSteps(
Expand Down
5 changes: 3 additions & 2 deletions tests/e2e/steps_double_sign.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

// Steps that make carol double sign on the provider, and bob double sign on a single consumer
// Steps that make carol double sign on the provider, and bob double sign on a single consumer.
// These steps happen after opt-out downtime traces have executed.
func stepsDoubleSignOnProviderAndConsumer(consumerName string) []Step {
return []Step{
{
Expand All @@ -22,7 +23,7 @@ func stepsDoubleSignOnProviderAndConsumer(consumerName string) []Step {
ValPowers: &map[validatorID]uint{
validatorID("alice"): 509,
validatorID("bob"): 500,
validatorID("carol"): 495, // not tombstoned on consumerName yet
validatorID("carol"): 501, // not tombstoned on consumerName yet
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/steps_submit_equivocation_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func stepsRejectEquivocationProposal(consumerName string, propNumber uint) []Ste
ValPowers: &map[validatorID]uint{
validatorID("alice"): 509,
validatorID("bob"): 500,
validatorID("carol"): 495,
validatorID("carol"): 501,
},
ValBalances: &map[validatorID]uint{
validatorID("bob"): 9500000000,
Expand All @@ -35,7 +35,7 @@ func stepsRejectEquivocationProposal(consumerName string, propNumber uint) []Ste
ValPowers: &map[validatorID]uint{
validatorID("alice"): 509,
validatorID("bob"): 500,
validatorID("carol"): 495,
validatorID("carol"): 501,
},
},
},
Expand Down

0 comments on commit 1c0f3c4

Please sign in to comment.