Skip to content

Commit

Permalink
Add flag for reading test traces
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Sep 20, 2023
1 parent 760c67a commit e62c9a7
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 71 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,17 @@ jobs:
go-version: "1.20"
- name: E2E tests
run: make test-e2e-short-cometmock
Trace-Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
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-trace
12 changes: 6 additions & 6 deletions .github/workflows/manual-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc happy-path::default
changeover-test:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -36,7 +36,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc changeover::changeover
democracy-reward-test:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -52,7 +52,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc democracy-reward::democracy-reward
democracy-test:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -68,7 +68,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc democracy::democracy
slash-throttle-test:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -84,7 +84,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc slash-throttle::slash-throttle
multiconsumer-test:
runs-on: ubuntu-latest
timeout-minutes: 40
Expand All @@ -100,4 +100,4 @@ jobs:
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
run: go run ./tests/e2e/... --tc multiconsumer::multiconsumer
12 changes: 6 additions & 6 deletions .github/workflows/nightly-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc happy-path::default
changeover-test:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -49,7 +49,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc changeover::changeover
democracy-reward-test:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -65,7 +65,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc democracy-reward::democracy-reward
democracy-test:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -81,7 +81,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc democracy::democracy
slash-throttle-test:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -97,7 +97,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc slash-throttle::slash-throttle
multiconsumer-test:
runs-on: ubuntu-latest
timeout-minutes: 40
Expand All @@ -113,7 +113,7 @@ jobs:
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
run: go run ./tests/e2e/... --tc multiconsumer::multiconsumer

nightly-test-fail:
needs:
Expand Down
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ test-diff:

# run only happy path E2E tests
test-e2e-short:
go run ./tests/e2e/... --tc happy-path
go run ./tests/e2e/... --tc happy-path::default

# 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/... --tc happy-path-short --use-cometmock --use-gorelayer
go run ./tests/e2e/... --tc happy-path-short::default --use-cometmock --use-gorelayer

# run full E2E tests in sequence (including multiconsumer)
test-e2e-multi-consumer:
Expand All @@ -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/... --tc happy-path --use-gaia
go run ./tests/e2e/... --tc happy-path::default --use-gaia

# run full E2E tests in parallel (including multiconsumer) using latest tagged gaia
test-gaia-e2e-parallel:
Expand All @@ -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/... --tc happy-path --use-gaia --gaia-tag $(GAIA_TAG)
go run ./tests/e2e/... --tc happy-path::default --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
Expand All @@ -77,6 +77,10 @@ test-gaia-e2e-parallel-tagged:
test-no-cache:
go test ./... -count=1 && go run ./tests/e2e/...

# test reading a trace from a file
test-trace:
go run ./tests/e2e/... --test-file tests/e2e/tracehandler_testdata/happyPath.json::default

###############################################################################
### Linting ###
###############################################################################
Expand All @@ -97,8 +101,6 @@ mockgen_cmd=go run github.com/golang/mock/mockgen
mocks:
$(mockgen_cmd) -package=keeper -destination=testutil/keeper/mocks.go -source=x/ccv/types/expected_keepers.go


BUILDDIR ?= $(CURDIR)/build
BUILD_TARGETS := build

build: BUILD_ARGS=-o $(BUILDDIR)/
Expand Down
Loading

0 comments on commit e62c9a7

Please sign in to comment.