From dad33d5754e2e71a296d96516690ecc809fa3d34 Mon Sep 17 00:00:00 2001 From: Bernd Date: Tue, 8 Aug 2023 15:55:51 +0200 Subject: [PATCH 01/13] Refactor Tests --- .github/workflows/automated-tests.yml | 2 +- .github/workflows/e2e-happy-path.yml | 30 +++++ tests/e2e/main.go | 168 +++++++++++++++++++------- tests/e2e/steps.go | 19 ++- 4 files changed, 174 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/e2e-happy-path.yml diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index a9b594f53d..07e82ce651 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -11,7 +11,7 @@ on: - release/v* - feat/* jobs: - Automated_Tests: + Unit_Integration_Tests: runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it diff --git a/.github/workflows/e2e-happy-path.yml b/.github/workflows/e2e-happy-path.yml new file mode 100644 index 0000000000..076bb2af08 --- /dev/null +++ b/.github/workflows/e2e-happy-path.yml @@ -0,0 +1,30 @@ +name: E2E HappyPath Tests +on: + push: + branches: + - main + - release/v* + - feat/* + pull_request: + branches: + - main + - release/v* + - feat/* +jobs: + e2e-happy-path: + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - 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" # The Go version to download (if necessary) and use. + - name: Proto Check + run: make proto-check + - name: E2E tests + run: make test-e2e-short \ No newline at end of file diff --git a/tests/e2e/main.go b/tests/e2e/main.go index 58bb065c26..1446305604 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -15,10 +15,28 @@ import ( "github.com/kylelemons/godebug/pretty" ) +// The list of test cases to be executed +type TestSet []string + +func (t *TestSet) Set(value string) (err error) { + // Check and skip duplicates + for _, v := range *t { + if v == value { + return + } + } + *t = append(*t, value) + return +} + +func (t *TestSet) String() string { + return fmt.Sprint(*t) +} + var ( - verbose = flag.Bool("verbose", false, "turn verbose logging on/off") - happyPathOnly = flag.Bool("happy-path-only", false, "run happy path tests only") - cometmockCompatibleHappyPath = flag.Bool("cometmock-happy-path", false, `run cometmock compatible happy path tests only. + verbose = flag.Bool("verbose", false, "turn verbose logging on/off") + happyPathOnly = flag.Bool("happy-path-only", false, "run happy path tests only") + kcometmockCompatibleHappyPath = flag.Bool("cometmock-happy-path", false, `run cometmock compatible happy path tests only. This is like the happy path, but skips steps that involve starting or stopping nodes for the same chain outside of the chain setup or teardown. This is suited for CometMock+Gorelayer testing`) @@ -35,59 +53,122 @@ var ( gaiaTag = flag.String("gaia-tag", "", "gaia tag to use - default is latest") ) -// runs E2E tests -// all docker containers are built sequentially to avoid race conditions when using local cosmos-sdk -// after building docker containers, all tests are run in parallel using their respective docker containers -func main() { +var ( + testSelection TestSet + testMap map[string]*testRunWithSteps = map[string]*testRunWithSteps{ + "happy-path-short": {testRun: DefaultTestRun(), steps: shortHappyPathSteps, + description: `run abridged happy path tests only. + This is like the happy path, but skips steps + that involve starting or stopping nodes for the same chain outside of the chain setup or teardown. + In particular, this skips steps related to downtime and double signing. + This is suited for CometMock+Gorelayer testing`}, + "happy-path": {testRun: DefaultTestRun(), steps: happyPathSteps, description: "happy path tests"}, + "happy-path-softoptout": {testRun: DefaultTestRun(), steps: happyPathSoftOptOutSteps, description: "happy path with soft opt-out downtime"}, + "changeover": {testRun: ChangeoverTestRun(), steps: changeoverSteps, description: "changeover tests"}, + "democracy-reward": {testRun: DemocracyTestRun(true), steps: democracySteps, description: "democracy tests allowing rewards"}, + "democracy": {testRun: DemocracyTestRun(false), steps: rewardDenomConsumerSteps, description: "democracy tests"}, //TODO: clarify why rewardsteps are with arg "reward=false" ??? + "slash-throttle": {testRun: SlashThrottleTestRun(), steps: slashThrottleSteps, description: "slash throttle tests"}, + "multiconsumer": {testRun: MultiConsumerTestRun(), steps: multipleConsumers, description: "multi-consumer tests"}, + } +) + +func executeTests(tests []testRunWithSteps) (err error) { + if parallel != nil && *parallel { + fmt.Println("=============== running all tests in parallel ===============") + } + + var wg sync.WaitGroup + for _, testCase := range tests { + if parallel != nil && *parallel { + wg.Add(1) + go func(run testRunWithSteps) { + defer wg.Done() + run.testRun.Run(run.steps, *localSdkPath, *useGaia, *gaiaTag) + }(testCase) + } else { + log.Printf("=============== running %s ===============\n", testCase.testRun.name) + testCase.testRun.Run(testCase.steps, *localSdkPath, *useGaia, *gaiaTag) + } + } + + if parallel != nil && *parallel { + wg.Wait() + } + return +} + +func parseArguments() (err error) { + flag.Var(&testSelection, "tc", + fmt.Sprintf("Selection of test cases to be executed:\n%s,\n%s", + func() string { + var keys []string + for k, v := range testMap { + keys = append(keys, fmt.Sprintf("- %s : %s", k, v.description)) + } + return strings.Join(keys, "\n") + }(), + "Example: -tc multiconsumer -tc happy-path ")) flag.Parse() - if cometmockCompatibleHappyPath != nil && *cometmockCompatibleHappyPath { - fmt.Println("=============== running short happy path only ===============") - tr := DefaultTestRun() - tr.Run(cometmockCompatibleHappyPathSteps, *localSdkPath, *useGaia, *gaiaTag) + // check if specified test case exists + for _, tc := range testSelection { + if _, hasKey := testMap[tc]; !hasKey { + err := fmt.Errorf("unknown test case '%s'", tc) + return err + } + } + return +} + +func getTestCases(selection TestSet) (tests []testRunWithSteps) { + + if shortHappyPathOnly != nil && *shortHappyPathOnly { + tests = append(tests, *testMap["happy-path-short"]) return } if happyPathOnly != nil && *happyPathOnly { - fmt.Println("=============== running happy path only ===============") - tr := DefaultTestRun() - tr.Run(happyPathSteps, *localSdkPath, *useGaia, *gaiaTag) + tests = append(tests, *testMap["happy-path"]) return } - testRuns := []testRunWithSteps{ - {ChangeoverTestRun(), changeoverSteps}, - {DefaultTestRun(), happyPathSteps}, - {DemocracyTestRun(true), democracySteps}, - {DemocracyTestRun(false), rewardDenomConsumerSteps}, - {SlashThrottleTestRun(), slashThrottleSteps}, - } - if includeMultiConsumer != nil && *includeMultiConsumer { - testRuns = append(testRuns, testRunWithSteps{MultiConsumerTestRun(), multipleConsumers}) + // Run default tests if no test cases were selected + if len(selection) == 0 { + selection = TestSet{"changeover", "happy-path", + "democracy-reward", "democracy", "slash-throttle"} + if includeMultiConsumer != nil && *includeMultiConsumer { + selection = append(selection, "multiconsumer") + } } - start := time.Now() - if parallel != nil && *parallel { - fmt.Println("=============== running all tests in parallel ===============") - var wg sync.WaitGroup - for _, run := range testRuns { - wg.Add(1) - go func(run testRunWithSteps) { - defer wg.Done() - tr := run.testRun - tr.Run(run.steps, *localSdkPath, *useGaia, *gaiaTag) - }(run) + // Get tests from selection + tests = []testRunWithSteps{} + for _, tc := range selection { + if _, exists := testMap[tc]; !exists { + log.Fatalf("Test case '%s' not found", tc) } - wg.Wait() - fmt.Printf("TOTAL TIME ELAPSED: %v\n", time.Since(start)) - return + tests = append(tests, *testMap[tc]) + } + return +} + +// runs E2E tests +// all docker containers are built sequentially to avoid race conditions when using local cosmos-sdk +// after building docker containers, all tests are run in parallel using their respective docker containers +func main() { + if err := parseArguments(); err != nil { + flag.Usage() + log.Fatalf("Error parsing command arguments %s\n", err) } - for _, run := range testRuns { - tr := run.testRun - tr.Run(run.steps, *localSdkPath, *useGaia, *gaiaTag) + testCases := getTestCases(testSelection) + + start := time.Now() + err := executeTests(testCases) + if err != nil { + log.Fatalf("Test execution failed '%s'", err) } - fmt.Printf("TOTAL TIME ELAPSED: %v\n", time.Since(start)) + log.Printf("TOTAL TIME ELAPSED: %v\n", time.Since(start)) } // Run sets up docker container and executes the steps in the test run. @@ -104,8 +185,9 @@ func (tr *TestRun) Run(steps []Step, localSdkPath string, useGaia bool, gaiaTag } type testRunWithSteps struct { - testRun TestRun - steps []Step + testRun TestRun + steps []Step + description string } func (tr *TestRun) runStep(step Step, verbose bool) { diff --git a/tests/e2e/steps.go b/tests/e2e/steps.go index 770ac45dda..2af3d227ad 100644 --- a/tests/e2e/steps.go +++ b/tests/e2e/steps.go @@ -31,7 +31,24 @@ var happyPathSteps = concatSteps( stepsStopChain("consu", 4), // stop chain ) -var cometmockCompatibleHappyPathSteps = concatSteps( +var happyPathSoftOptOutSteps = concatSteps( + stepsStartChains([]string{"consu"}, false), + stepsDelegate("consu"), + stepsAssignConsumerKeyOnStartedChain("consu", "bob"), + stepsUnbond("consu"), + stepsCancelUnbond("consu"), + stepsRedelegateForOptOut("consu"), + stepsDowntimeWithOptOut("consu"), + stepsRedelegate("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 +) + +var shortHappyPathSteps = concatSteps( stepsStartChains([]string{"consu"}, false), stepsDelegate("consu"), stepsUnbond("consu"), From fb8ab731cb76722cff1e6fa2aab70ae90492c127 Mon Sep 17 00:00:00 2001 From: Bernd Date: Wed, 9 Aug 2023 15:25:10 +0200 Subject: [PATCH 02/13] Remove option happy-path-only, short-happy-path --- Makefile | 6 +++--- tests/e2e/main.go | 18 +----------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index edbacbc0e0..048b3d9fc8 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ test-diff: # run only happy path E2E tests test-e2e-short: - go run ./tests/e2e/... --happy-path-only + go run ./tests/e2e/... --tc happy-path # run only happy path E2E tests with cometmock # this set of traces does not test equivocation but it does check downtime @@ -52,7 +52,7 @@ test-gaia-e2e: # run only happy path E2E tests using latest tagged gaia test-gaia-e2e-short: - go run ./tests/e2e/... --happy-path-only --use-gaia + go run ./tests/e2e/... --tc happy-path --use-gaia # run full E2E tests in parallel (including multiconsumer) using latest tagged gaia test-gaia-e2e-parallel: @@ -66,7 +66,7 @@ test-gaia-e2e-tagged: # run only happy path E2E tests using latest tagged gaia # usage: GAIA_TAG=v9.0.0 make test-gaia-e2e-short-tagged test-gaia-e2e-short-tagged: - go run ./tests/e2e/... --happy-path-only --use-gaia --gaia-tag $(GAIA_TAG) + go run ./tests/e2e/... --tc happy-path --use-gaia --gaia-tag $(GAIA_TAG) # run full E2E tests in parallel (including multiconsumer) using specific tagged version of gaia # usage: GAIA_TAG=v9.0.0 make test-gaia-e2e-parallel-tagged diff --git a/tests/e2e/main.go b/tests/e2e/main.go index 1446305604..c6d831cc49 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -34,12 +34,7 @@ func (t *TestSet) String() string { } var ( - verbose = flag.Bool("verbose", false, "turn verbose logging on/off") - happyPathOnly = flag.Bool("happy-path-only", false, "run happy path tests only") - kcometmockCompatibleHappyPath = flag.Bool("cometmock-happy-path", false, `run cometmock compatible happy path tests only. -This is like the happy path, but skips steps -that involve starting or stopping nodes for the same chain outside of the chain setup or teardown. -This is suited for CometMock+Gorelayer testing`) + verbose = flag.Bool("verbose", false, "turn verbose logging on/off") includeMultiConsumer = flag.Bool("include-multi-consumer", false, "include multiconsumer tests in run") parallel = flag.Bool("parallel", false, "run all tests in parallel") localSdkPath = flag.String("local-sdk-path", "", @@ -121,17 +116,6 @@ func parseArguments() (err error) { } func getTestCases(selection TestSet) (tests []testRunWithSteps) { - - if shortHappyPathOnly != nil && *shortHappyPathOnly { - tests = append(tests, *testMap["happy-path-short"]) - return - } - - if happyPathOnly != nil && *happyPathOnly { - tests = append(tests, *testMap["happy-path"]) - return - } - // Run default tests if no test cases were selected if len(selection) == 0 { selection = TestSet{"changeover", "happy-path", From e497694b8d3314ba36da9ff851d6e9af7cb68db1 Mon Sep 17 00:00:00 2001 From: Bernd Date: Wed, 9 Aug 2023 16:36:47 +0200 Subject: [PATCH 03/13] Move E2E and Cometmock to dedicated workflow --- .github/workflows/automated-tests.yml | 28 --------------------------- .github/workflows/e2e-happy-path.yml | 23 ++++++++++++++++------ 2 files changed, 17 insertions(+), 34 deletions(-) diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index 07e82ce651..ca3dd168e3 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -28,31 +28,3 @@ 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 - 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 diff --git a/.github/workflows/e2e-happy-path.yml b/.github/workflows/e2e-happy-path.yml index 076bb2af08..f782d48443 100644 --- a/.github/workflows/e2e-happy-path.yml +++ b/.github/workflows/e2e-happy-path.yml @@ -11,10 +11,9 @@ on: - release/v* - feat/* jobs: - e2e-happy-path: + E2E_Tests: runs-on: ubuntu-latest steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 with: lfs: true @@ -23,8 +22,20 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: "1.20" # The Go version to download (if necessary) and use. - - name: Proto Check - run: make proto-check + go-version: "1.20" - name: E2E tests - run: make test-e2e-short \ No newline at end of file + 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 From be539b2cc063dc6a83371b71487cd06d303c37a6 Mon Sep 17 00:00:00 2001 From: Bernd Date: Wed, 9 Aug 2023 16:47:24 +0200 Subject: [PATCH 04/13] Fix Makefile --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 048b3d9fc8..ac7c38f068 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ install: go.sum go install $(BUILD_FLAGS) ./cmd/interchain-security-sd # run all tests: unit, integration, diff, and E2E -test: - go test ./... && go run ./tests/e2e/... +test: + go test ./... && go run ./tests/e2e/... # run all unit tests test-unit: @@ -36,7 +36,7 @@ test-e2e-short: # 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/... --cometmock-happy-path --use-cometmock --use-gorelayer + go run ./tests/e2e/... --tc happy-path-short --use-cometmock --use-gorelayer # run full E2E tests in sequence (including multiconsumer) test-e2e-multi-consumer: From f0c272123582071b0a76025f11b9389ad9412399 Mon Sep 17 00:00:00 2001 From: Bernd Date: Wed, 9 Aug 2023 17:37:05 +0200 Subject: [PATCH 05/13] fix linter issues --- tests/e2e/main.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/e2e/main.go b/tests/e2e/main.go index c6d831cc49..8562f52dd3 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -51,17 +51,19 @@ var ( var ( testSelection TestSet testMap map[string]*testRunWithSteps = map[string]*testRunWithSteps{ - "happy-path-short": {testRun: DefaultTestRun(), steps: shortHappyPathSteps, + "happy-path-short": { + testRun: DefaultTestRun(), steps: shortHappyPathSteps, description: `run abridged happy path tests only. This is like the happy path, but skips steps that involve starting or stopping nodes for the same chain outside of the chain setup or teardown. In particular, this skips steps related to downtime and double signing. - This is suited for CometMock+Gorelayer testing`}, + This is suited for CometMock+Gorelayer testing`, + }, "happy-path": {testRun: DefaultTestRun(), steps: happyPathSteps, description: "happy path tests"}, "happy-path-softoptout": {testRun: DefaultTestRun(), steps: happyPathSoftOptOutSteps, description: "happy path with soft opt-out downtime"}, "changeover": {testRun: ChangeoverTestRun(), steps: changeoverSteps, description: "changeover tests"}, "democracy-reward": {testRun: DemocracyTestRun(true), steps: democracySteps, description: "democracy tests allowing rewards"}, - "democracy": {testRun: DemocracyTestRun(false), steps: rewardDenomConsumerSteps, description: "democracy tests"}, //TODO: clarify why rewardsteps are with arg "reward=false" ??? + "democracy": {testRun: DemocracyTestRun(false), steps: rewardDenomConsumerSteps, description: "democracy tests"}, // TODO: clarify why rewardsteps are with arg "reward=false" ??? "slash-throttle": {testRun: SlashThrottleTestRun(), steps: slashThrottleSteps, description: "slash throttle tests"}, "multiconsumer": {testRun: MultiConsumerTestRun(), steps: multipleConsumers, description: "multi-consumer tests"}, } @@ -118,8 +120,10 @@ func parseArguments() (err error) { func getTestCases(selection TestSet) (tests []testRunWithSteps) { // Run default tests if no test cases were selected if len(selection) == 0 { - selection = TestSet{"changeover", "happy-path", - "democracy-reward", "democracy", "slash-throttle"} + selection = TestSet{ + "changeover", "happy-path", + "democracy-reward", "democracy", "slash-throttle", + } if includeMultiConsumer != nil && *includeMultiConsumer { selection = append(selection, "multiconsumer") } From 657e67499f7380559376774366cf4f76eb532162 Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 10 Aug 2023 10:59:24 +0200 Subject: [PATCH 06/13] Split test in e2e manual workflow --- .github/workflows/manual-e2e.yml | 89 +++++++++++++++++++++++++++++--- tests/e2e/main.go | 2 +- 2 files changed, 84 insertions(+), 7 deletions(-) diff --git a/.github/workflows/manual-e2e.yml b/.github/workflows/manual-e2e.yml index 899e4ba230..e267aabbcf 100644 --- a/.github/workflows/manual-e2e.yml +++ b/.github/workflows/manual-e2e.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: jobs: - manual-integration-main: + happy-path-test: runs-on: ubuntu-latest timeout-minutes: 60 steps: @@ -13,14 +13,91 @@ jobs: with: go-version: "1.20" - uses: actions/checkout@v3 - - name: Checkout LFS objects run: git lfs checkout - - name: Setup Go uses: actions/setup-go@v4 with: go-version: "1.20" # The Go version to download (if necessary) and use. - - - name: E2E tests - run: make test-e2e + - name: E2E happy-path test + run: go run ./tests/e2e/... --tc happy-path + changeover-test: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E changeover test + run: go run ./tests/e2e/... --tc changeover + democracy-reward-test: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E democracy-reward tests + run: go run ./tests/e2e/... --tc democracy-reward + democracy-test: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E democracy tests + run: go run ./tests/e2e/... --tc democracy + slash-throttle-test: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E slash-throttle tests + run: go run ./tests/e2e/... --tc slash-throttle + multiconsumer-test: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E multi-consumer tests + run: go run ./tests/e2e/... --tc multiconsumer diff --git a/tests/e2e/main.go b/tests/e2e/main.go index 8562f52dd3..7e22940f61 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -65,7 +65,7 @@ var ( "democracy-reward": {testRun: DemocracyTestRun(true), steps: democracySteps, description: "democracy tests allowing rewards"}, "democracy": {testRun: DemocracyTestRun(false), steps: rewardDenomConsumerSteps, description: "democracy tests"}, // TODO: clarify why rewardsteps are with arg "reward=false" ??? "slash-throttle": {testRun: SlashThrottleTestRun(), steps: slashThrottleSteps, description: "slash throttle tests"}, - "multiconsumer": {testRun: MultiConsumerTestRun(), steps: multipleConsumers, description: "multi-consumer tests"}, + "multiconsumer": {testRun: MultiConsumerTestRun(), steps: multipleConsumers, description: "multi consumer tests"}, } ) From 7b840422b5b730e892aa742f8ae2e72c35205ea0 Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 10 Aug 2023 12:48:30 +0200 Subject: [PATCH 07/13] Enforce go-relayer on cometmock usage --- tests/e2e/main.go | 18 +++++++++++------- tests/e2e/steps.go | 17 ----------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/tests/e2e/main.go b/tests/e2e/main.go index 7e22940f61..24dbc21a44 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -59,13 +59,12 @@ var ( In particular, this skips steps related to downtime and double signing. This is suited for CometMock+Gorelayer testing`, }, - "happy-path": {testRun: DefaultTestRun(), steps: happyPathSteps, description: "happy path tests"}, - "happy-path-softoptout": {testRun: DefaultTestRun(), steps: happyPathSoftOptOutSteps, description: "happy path with soft opt-out downtime"}, - "changeover": {testRun: ChangeoverTestRun(), steps: changeoverSteps, description: "changeover tests"}, - "democracy-reward": {testRun: DemocracyTestRun(true), steps: democracySteps, description: "democracy tests allowing rewards"}, - "democracy": {testRun: DemocracyTestRun(false), steps: rewardDenomConsumerSteps, description: "democracy tests"}, // TODO: clarify why rewardsteps are with arg "reward=false" ??? - "slash-throttle": {testRun: SlashThrottleTestRun(), steps: slashThrottleSteps, description: "slash throttle tests"}, - "multiconsumer": {testRun: MultiConsumerTestRun(), steps: multipleConsumers, description: "multi consumer tests"}, + "happy-path": {testRun: DefaultTestRun(), steps: happyPathSteps, description: "happy path tests"}, + "changeover": {testRun: ChangeoverTestRun(), steps: changeoverSteps, description: "changeover tests"}, + "democracy-reward": {testRun: DemocracyTestRun(true), steps: democracySteps, description: "democracy tests allowing rewards"}, + "democracy": {testRun: DemocracyTestRun(false), steps: rewardDenomConsumerSteps, description: "democracy tests"}, // TODO: clarify why rewardsteps are with arg "reward=false" ??? + "slash-throttle": {testRun: SlashThrottleTestRun(), steps: slashThrottleSteps, description: "slash throttle tests"}, + "multiconsumer": {testRun: MultiConsumerTestRun(), steps: multipleConsumers, description: "multi consumer tests"}, } ) @@ -107,6 +106,11 @@ func parseArguments() (err error) { "Example: -tc multiconsumer -tc happy-path ")) flag.Parse() + // Enforce go-relayer in case of cometmock as hermes is not yet supported + if useCometmock != nil && *useCometmock && (useGorelayer == nil || !*useGorelayer) { + fmt.Println("Enforcing go-relayer as cometmock is requested") + flag.Set("use-gorelayer", "true") + } // check if specified test case exists for _, tc := range testSelection { if _, hasKey := testMap[tc]; !hasKey { diff --git a/tests/e2e/steps.go b/tests/e2e/steps.go index 2af3d227ad..b33d19783a 100644 --- a/tests/e2e/steps.go +++ b/tests/e2e/steps.go @@ -31,23 +31,6 @@ var happyPathSteps = concatSteps( stepsStopChain("consu", 4), // stop chain ) -var happyPathSoftOptOutSteps = concatSteps( - stepsStartChains([]string{"consu"}, false), - stepsDelegate("consu"), - stepsAssignConsumerKeyOnStartedChain("consu", "bob"), - stepsUnbond("consu"), - stepsCancelUnbond("consu"), - stepsRedelegateForOptOut("consu"), - stepsDowntimeWithOptOut("consu"), - stepsRedelegate("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 -) - var shortHappyPathSteps = concatSteps( stepsStartChains([]string{"consu"}, false), stepsDelegate("consu"), From 8c7a30c102aceb55977e33bf5a4389ebe76b9199 Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 10 Aug 2023 12:53:25 +0200 Subject: [PATCH 08/13] Revert "Move E2E and Cometmock to dedicated workflow" This reverts commit b4de5866b88cab8b5bc6f419656d28d4f90b884c. --- .github/workflows/automated-tests.yml | 28 ++++++++++++++++++ .github/workflows/e2e-happy-path.yml | 41 --------------------------- 2 files changed, 28 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/e2e-happy-path.yml diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index ca3dd168e3..07e82ce651 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -28,3 +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 + 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 diff --git a/.github/workflows/e2e-happy-path.yml b/.github/workflows/e2e-happy-path.yml deleted file mode 100644 index f782d48443..0000000000 --- a/.github/workflows/e2e-happy-path.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: E2E HappyPath Tests -on: - push: - branches: - - main - - release/v* - - feat/* - pull_request: - branches: - - main - - release/v* - - feat/* -jobs: - 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 - 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 From 704e35d00fd7973327161ede33a192b74545169b Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 10 Aug 2023 14:41:43 +0200 Subject: [PATCH 09/13] Update description --- tests/e2e/main.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/e2e/main.go b/tests/e2e/main.go index 24dbc21a44..f0f5137a4d 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -53,16 +53,15 @@ var ( testMap map[string]*testRunWithSteps = map[string]*testRunWithSteps{ "happy-path-short": { testRun: DefaultTestRun(), steps: shortHappyPathSteps, - description: `run abridged happy path tests only. - This is like the happy path, but skips steps - that involve starting or stopping nodes for the same chain outside of the chain setup or teardown. - In particular, this skips steps related to downtime and double signing. - This is suited for CometMock+Gorelayer testing`, + description: `This is like the happy path, but skips steps +that involve starting or stopping nodes for the same chain outside of the chain setup or teardown. +In particular, this skips steps related to downtime and double signing. +This is suited for CometMock+Gorelayer testing`, }, "happy-path": {testRun: DefaultTestRun(), steps: happyPathSteps, description: "happy path tests"}, "changeover": {testRun: ChangeoverTestRun(), steps: changeoverSteps, description: "changeover tests"}, "democracy-reward": {testRun: DemocracyTestRun(true), steps: democracySteps, description: "democracy tests allowing rewards"}, - "democracy": {testRun: DemocracyTestRun(false), steps: rewardDenomConsumerSteps, description: "democracy tests"}, // TODO: clarify why rewardsteps are with arg "reward=false" ??? + "democracy": {testRun: DemocracyTestRun(false), steps: rewardDenomConsumerSteps, description: "democracy tests"}, "slash-throttle": {testRun: SlashThrottleTestRun(), steps: slashThrottleSteps, description: "slash throttle tests"}, "multiconsumer": {testRun: MultiConsumerTestRun(), steps: multipleConsumers, description: "multi consumer tests"}, } From 7f2ac8544fbf4dcaa858ceb69b2c5a6b2fc8b2d9 Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 10 Aug 2023 14:47:10 +0200 Subject: [PATCH 10/13] Introduce action for e2e setup --- .github/actions/action-e2e-setup/action.yml | 21 +++++++ .github/workflows/automated-tests.yml | 2 +- .github/workflows/manual-e2e.yml | 14 ++--- .github/workflows/nightly-e2e.yml | 68 ++++++++++++++++++--- 4 files changed, 84 insertions(+), 21 deletions(-) create mode 100644 .github/actions/action-e2e-setup/action.yml diff --git a/.github/actions/action-e2e-setup/action.yml b/.github/actions/action-e2e-setup/action.yml new file mode 100644 index 0000000000..83b20f51ee --- /dev/null +++ b/.github/actions/action-e2e-setup/action.yml @@ -0,0 +1,21 @@ +name: 'Setup environment' +description: 'Setup environment for E2E tests' +inputs: + go-version: + description: 'Version of go to be used' + required: true + default: '1.20' +runs: + using: "composite" + steps: + - uses: actions/setup-go@v4 + with: + go-version: ${{ inputs.go-version}} + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + shell: bash + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ${{ inputs.go-version}} # The Go version to download (if necessary) and use. diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index 07e82ce651..a9b594f53d 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -11,7 +11,7 @@ on: - release/v* - feat/* jobs: - Unit_Integration_Tests: + Automated_Tests: runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it diff --git a/.github/workflows/manual-e2e.yml b/.github/workflows/manual-e2e.yml index e267aabbcf..d0ffc6a9ad 100644 --- a/.github/workflows/manual-e2e.yml +++ b/.github/workflows/manual-e2e.yml @@ -9,16 +9,10 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/setup-go@v4 - with: - go-version: "1.20" - - uses: actions/checkout@v3 - - name: Checkout LFS objects - run: git lfs checkout - - name: Setup Go - uses: actions/setup-go@v4 - with: - go-version: "1.20" # The Go version to download (if necessary) and use. + - name: Check out repo + uses: actions/checkout@v3 + - name: E2E Setup + uses: ./.github/actions/action-e2e-setup - name: E2E happy-path test run: go run ./tests/e2e/... --tc happy-path changeover-test: diff --git a/.github/workflows/nightly-e2e.yml b/.github/workflows/nightly-e2e.yml index f69125e6b8..80e7c10893 100644 --- a/.github/workflows/nightly-e2e.yml +++ b/.github/workflows/nightly-e2e.yml @@ -18,21 +18,69 @@ on: - cron: "0 3 * * *" jobs: - nightly-test: + happy-path-test: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 20 steps: - - uses: actions/setup-go@v4 - with: - go-version: "1.20" - - uses: actions/checkout@v3 - - - name: E2E tests - run: make test-e2e + - name: E2E Setup + uses: ./.github/actions/action-e2e-setup + - name: E2E happy-path test + run: go run ./tests/e2e/... --tc happy-path + changeover-test: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + - name: E2E Setup + uses: ./.github/actions/action-e2e-setup + - name: E2E changeover test + run: go run ./tests/e2e/... --tc changeover + democracy-reward-test: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + - name: E2E Setup + uses: ./.github/actions/action-e2e-setup + - name: E2E democracy-reward tests + run: go run ./tests/e2e/... --tc democracy-reward + democracy-test: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + - name: E2E Setup + uses: ./.github/actions/action-e2e-setup + - name: E2E democracy tests + run: go run ./tests/e2e/... --tc democracy + slash-throttle-test: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + - name: E2E Setup + uses: ./.github/actions/action-e2e-setup + - name: E2E slash-throttle tests + run: go run ./tests/e2e/... --tc slash-throttle + multiconsumer-test: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v3 + - name: E2E Setup + uses: ./.github/actions/action-e2e-setup + - name: E2E multi-consumer tests + run: go run ./tests/e2e/... --tc multiconsumer nightly-test-fail: - needs: nightly-test + needs: + - happy-path-test + - changeover-test + - democracy-reward-test + - democracy-test + - slash-throttle-test + - multiconsumer-test if: ${{ failure() }} runs-on: ubuntu-latest steps: From b57eb9556221043ba26adafc82e8373f39346843 Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 10 Aug 2023 15:44:36 +0200 Subject: [PATCH 11/13] Revert e2e action --- .github/actions/action-e2e-setup/action.yml | 21 ---- .github/workflows/manual-e2e.yml | 54 +++++---- .github/workflows/nightly-e2e.yml | 116 +++++++++++++------- 3 files changed, 109 insertions(+), 82 deletions(-) delete mode 100644 .github/actions/action-e2e-setup/action.yml diff --git a/.github/actions/action-e2e-setup/action.yml b/.github/actions/action-e2e-setup/action.yml deleted file mode 100644 index 83b20f51ee..0000000000 --- a/.github/actions/action-e2e-setup/action.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: 'Setup environment' -description: 'Setup environment for E2E tests' -inputs: - go-version: - description: 'Version of go to be used' - required: true - default: '1.20' -runs: - using: "composite" - steps: - - uses: actions/setup-go@v4 - with: - go-version: ${{ inputs.go-version}} - - uses: actions/checkout@v3 - - name: Checkout LFS objects - run: git lfs checkout - shell: bash - - name: Setup Go - uses: actions/setup-go@v4 - with: - go-version: ${{ inputs.go-version}} # The Go version to download (if necessary) and use. diff --git a/.github/workflows/manual-e2e.yml b/.github/workflows/manual-e2e.yml index d0ffc6a9ad..388a19f0f5 100644 --- a/.github/workflows/manual-e2e.yml +++ b/.github/workflows/manual-e2e.yml @@ -7,33 +7,39 @@ on: jobs: happy-path-test: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 20 steps: - - name: Check out repo - uses: actions/checkout@v3 - - name: E2E Setup - uses: ./.github/actions/action-e2e-setup + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. - name: E2E happy-path test run: go run ./tests/e2e/... --tc happy-path changeover-test: - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/setup-go@v4 - with: - go-version: "1.20" - - uses: actions/checkout@v3 - - name: Checkout LFS objects - run: git lfs checkout - - name: Setup Go - uses: actions/setup-go@v4 - with: - go-version: "1.20" # The Go version to download (if necessary) and use. - - name: E2E changeover test - run: go run ./tests/e2e/... --tc changeover + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E changeover test + run: go run ./tests/e2e/... --tc changeover democracy-reward-test: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 20 steps: - uses: actions/setup-go@v4 with: @@ -49,7 +55,7 @@ jobs: run: go run ./tests/e2e/... --tc democracy-reward democracy-test: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 20 steps: - uses: actions/setup-go@v4 with: @@ -65,7 +71,7 @@ jobs: run: go run ./tests/e2e/... --tc democracy slash-throttle-test: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 20 steps: - uses: actions/setup-go@v4 with: @@ -81,7 +87,7 @@ jobs: run: go run ./tests/e2e/... --tc slash-throttle multiconsumer-test: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 20 steps: - uses: actions/setup-go@v4 with: diff --git a/.github/workflows/nightly-e2e.yml b/.github/workflows/nightly-e2e.yml index 80e7c10893..cd7f155e12 100644 --- a/.github/workflows/nightly-e2e.yml +++ b/.github/workflows/nightly-e2e.yml @@ -22,59 +22,101 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 20 steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" - uses: actions/checkout@v3 - - name: E2E Setup - uses: ./.github/actions/action-e2e-setup + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. - name: E2E happy-path test run: go run ./tests/e2e/... --tc happy-path changeover-test: runs-on: ubuntu-latest timeout-minutes: 20 steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" - uses: actions/checkout@v3 - - name: E2E Setup - uses: ./.github/actions/action-e2e-setup + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. - name: E2E changeover test run: go run ./tests/e2e/... --tc changeover democracy-reward-test: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v3 - - name: E2E Setup - uses: ./.github/actions/action-e2e-setup - - name: E2E democracy-reward tests - run: go run ./tests/e2e/... --tc democracy-reward + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E democracy-reward tests + run: go run ./tests/e2e/... --tc democracy-reward democracy-test: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v3 - - name: E2E Setup - uses: ./.github/actions/action-e2e-setup - - name: E2E democracy tests - run: go run ./tests/e2e/... --tc democracy + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E democracy tests + run: go run ./tests/e2e/... --tc democracy slash-throttle-test: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v3 - - name: E2E Setup - uses: ./.github/actions/action-e2e-setup - - name: E2E slash-throttle tests - run: go run ./tests/e2e/... --tc slash-throttle + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E slash-throttle tests + run: go run ./tests/e2e/... --tc slash-throttle multiconsumer-test: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v3 - - name: E2E Setup - uses: ./.github/actions/action-e2e-setup - - name: E2E multi-consumer tests - run: go run ./tests/e2e/... --tc multiconsumer + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - uses: actions/checkout@v3 + - name: Checkout LFS objects + run: git lfs checkout + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # The Go version to download (if necessary) and use. + - name: E2E multi-consumer tests + run: go run ./tests/e2e/... --tc multiconsumer nightly-test-fail: - needs: + needs: - happy-path-test - changeover-test - democracy-reward-test From 128ca6b63be25e000c810704ba0472f3f7f35c03 Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 10 Aug 2023 16:54:51 +0200 Subject: [PATCH 12/13] added error handling for flag.set --- tests/e2e/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e/main.go b/tests/e2e/main.go index f0f5137a4d..c6d0c45cdd 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -108,7 +108,9 @@ func parseArguments() (err error) { // Enforce go-relayer in case of cometmock as hermes is not yet supported if useCometmock != nil && *useCometmock && (useGorelayer == nil || !*useGorelayer) { fmt.Println("Enforcing go-relayer as cometmock is requested") - flag.Set("use-gorelayer", "true") + if err = flag.Set("use-gorelayer", "true"); err != nil { + return + } } // check if specified test case exists for _, tc := range testSelection { From f0a700e1643f384c489cc8d22c29d83c2c4609f2 Mon Sep 17 00:00:00 2001 From: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:37:43 +0200 Subject: [PATCH 13/13] Update docstring for short-happy-path The old docstring was outdated and since modified on main --- tests/e2e/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/e2e/main.go b/tests/e2e/main.go index c6d0c45cdd..e9336422ae 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -55,7 +55,6 @@ var ( testRun: DefaultTestRun(), steps: shortHappyPathSteps, description: `This is like the happy path, but skips steps that involve starting or stopping nodes for the same chain outside of the chain setup or teardown. -In particular, this skips steps related to downtime and double signing. This is suited for CometMock+Gorelayer testing`, }, "happy-path": {testRun: DefaultTestRun(), steps: happyPathSteps, description: "happy path tests"},