-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: separate e2e tests into a standalone module #1273
Changes from 12 commits
c048452
487196b
ff0e7d9
6b8cc22
1237330
940b440
afe01a0
4e11e59
e70a9f1
4fe67a2
5b5e011
bb3d7fd
b85b3e1
d947330
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ docs/tla/states/ | |
vendor/ | ||
.vscode | ||
.idea | ||
|
||
# Go workspace files should not be pushed. | ||
go.work | ||
go.work.sum |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,14 @@ install: go.sum | |
export GOFLAGS='-buildmode=pie' | ||
export CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2" | ||
export CGO_LDFLAGS="-Wl,-z,relro,-z,now -fstack-protector" | ||
go install $(BUILD_FLAGS) ./cmd/interchain-security-pd | ||
go install $(BUILD_FLAGS) ./cmd/interchain-security-cd | ||
go install $(BUILD_FLAGS) ./cmd/interchain-security-cdd | ||
go install $(BUILD_FLAGS) ./cmd/interchain-security-sd | ||
GOWORK='off' go install $(BUILD_FLAGS) ./cmd/interchain-security-pd | ||
GOWORK='off' go install $(BUILD_FLAGS) ./cmd/interchain-security-cd | ||
GOWORK='off' go install $(BUILD_FLAGS) ./cmd/interchain-security-cdd | ||
GOWORK='off' 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 ./e2e/... | ||
|
||
# run all unit tests | ||
test-unit: | ||
|
@@ -23,59 +23,59 @@ test-short: | |
|
||
# run E2E tests | ||
test-e2e: | ||
go run ./tests/e2e/... | ||
go run ./e2e/... | ||
|
||
# run difference tests | ||
test-diff: | ||
go test ./tests/difference/... | ||
|
||
# run only happy path E2E tests | ||
test-e2e-short: | ||
go run ./tests/e2e/... --tc happy-path | ||
go run ./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 | ||
test-e2e-short-cometmock: | ||
go run ./tests/e2e/... --tc happy-path-short --use-cometmock --use-gorelayer | ||
go run ./e2e/... --tc happy-path-short --use-cometmock --use-gorelayer | ||
|
||
# run full E2E tests in sequence (including multiconsumer) | ||
test-e2e-multi-consumer: | ||
go run ./tests/e2e/... --include-multi-consumer | ||
go run ./e2e/... --include-multi-consumer | ||
|
||
# run full E2E tests in parallel (including multiconsumer) | ||
test-e2e-parallel: | ||
go run ./tests/e2e/... --include-multi-consumer --parallel | ||
go run ./e2e/... --include-multi-consumer --parallel | ||
|
||
# run full E2E tests in sequence (including multiconsumer) using latest tagged gaia | ||
test-gaia-e2e: | ||
go run ./tests/e2e/... --include-multi-consumer --use-gaia | ||
go run ./e2e/... --include-multi-consumer --use-gaia | ||
|
||
# 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 ./e2e/... --happy-path-only --use-gaia | ||
|
||
# run full E2E tests in parallel (including multiconsumer) using latest tagged gaia | ||
test-gaia-e2e-parallel: | ||
go run ./tests/e2e/... --include-multi-consumer --parallel --use-gaia | ||
go run ./e2e/... --include-multi-consumer --parallel --use-gaia | ||
|
||
# run full E2E tests in sequence (including multiconsumer) using specific tagged version of gaia | ||
# usage: GAIA_TAG=v9.0.0 make test-gaia-e2e-tagged | ||
test-gaia-e2e-tagged: | ||
go run ./tests/e2e/... --include-multi-consumer --use-gaia --gaia-tag $(GAIA_TAG) | ||
go run ./e2e/... --include-multi-consumer --use-gaia --gaia-tag $(GAIA_TAG) | ||
|
||
# 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 ./e2e/... --happy-path-only --use-gaia --gaia-tag $(GAIA_TAG) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here, what is the reason to go back to the 'old' flag and not using --tc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That test has not been working for a while. Gaia is on v45, the ICS main is on v47. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed, thanks! |
||
|
||
# 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 | ||
test-gaia-e2e-parallel-tagged: | ||
go run ./tests/e2e/... --include-multi-consumer --parallel --use-gaia --gaia-tag $(GAIA_TAG) | ||
go run ./e2e/... --include-multi-consumer --parallel --use-gaia --gaia-tag $(GAIA_TAG) | ||
|
||
# run all tests with caching disabled | ||
test-no-cache: | ||
go test ./... -count=1 && go run ./tests/e2e/... | ||
go test ./... -count=1 && go run ./e2e/... | ||
|
||
############################################################################### | ||
### Linting ### | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ brew install jq | |
|
||
**Installing and running binaries** | ||
|
||
This repository consists of multiple go modules. In order to have a smooth development experience, please add a `go.work` file. It is enough to copy and rename the `go.work.example` file. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The go.work file is also in this PR, this makes me think it should not. Should we remove the go.work file itself from the PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, the It is commited for now because the testing pipelines fail if you don't commit a go work file. The This can also be fixed by some # create a go.work file on the fly by renaming go.work.example
mv ./go.work.example ./go.work
go test (...) I opted to not do that now since it would be more confusing than just commiting the file directly. Notice how none of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, makes sense. Then maybe let's change that line in the README to account for the fact that the go.work file is in the repo already and keep it like this for now? |
||
|
||
```bash | ||
# install interchain-security-pd and interchain-security-cd binaries | ||
make install | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.