Skip to content
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

Separate go mod for e2e (E2E #4) #1701

Merged
merged 42 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
47be6be
feat(e2e): adding script to dynamically generate list of e2e tests
chatton Jul 4, 2022
ce80411
feat(e2e): adding github CI to run E2E tests
chatton Jul 4, 2022
bfbba03
feat(e2e) adding placeholder test for github action to execute
chatton Jul 4, 2022
4569fa5
wip: extracting correct tag for image
chatton Jul 4, 2022
272ad61
wip: extracting correct tag for image
chatton Jul 4, 2022
6afe90c
wip: corrected workflow syntax
chatton Jul 4, 2022
7497574
wip: corrected workflow syntax
chatton Jul 4, 2022
7091fbc
removed unreferenced job
chatton Jul 4, 2022
6ebcc6d
wip: adding makefile
chatton Jul 4, 2022
05d9a45
wip: displaying env vars in placeholder test
chatton Jul 4, 2022
308eb0f
wip: adding go script to determine simd tag
chatton Jul 4, 2022
9ebacd7
fix: corrected outputs name in test.yml
chatton Jul 4, 2022
c431850
fix: specifying correct output name
chatton Jul 4, 2022
3c4f62b
fix: updating go script to accept a single argument
chatton Jul 4, 2022
b5fff2a
chore: greatly simplifying determine_simd_tag.go
chatton Jul 4, 2022
abb0eca
chore: adding docstring to determine_simd_tag.go
chatton Jul 4, 2022
f36025b
chore: extract output variable
chatton Jul 4, 2022
9039137
chore: adding echo to display the tag in the workflow
chatton Jul 4, 2022
30591c9
feat(e2e): adding E2ETestSuite
chatton Jul 4, 2022
b43d07e
wip: temporarily remove entrypoint in dockerfile
chatton Jul 4, 2022
b1bcc12
chore: removing SkipPathCreation
chatton Jul 4, 2022
d740296
removed Req and eRep member fields
chatton Jul 4, 2022
e94d35b
merge main
chatton Jul 6, 2022
848f888
chore: adding docstrings and cleaning up E2ETestSuite
chatton Jul 6, 2022
99328b1
merge main
chatton Jul 8, 2022
35e454f
chore: correcting docstring
chatton Jul 8, 2022
ccd9fd5
chore: updating test.yml to pass only the pr
chatton Jul 8, 2022
e154f09
chore: upgrading go to 1.18 for e2e test
chatton Jul 8, 2022
236eb9f
Merge branch 'main' into cian/issue#1648-add-baseline-e2e-test-suite-…
chatton Jul 12, 2022
11227eb
Merge branch 'main' into cian/issue#1648-add-baseline-e2e-test-suite-…
chatton Jul 13, 2022
7541beb
Merge branch 'main' into cian/issue#1648-add-baseline-e2e-test-suite-…
chatton Jul 13, 2022
e768a46
chore: addressing PR feedback
chatton Jul 14, 2022
ce2828e
Merge branch 'cian/issue#1648-add-baseline-e2e-test-suite-type-(e2e-#…
chatton Jul 14, 2022
2f77cd3
chore: adding separate go.mod for e2e tests
chatton Jul 14, 2022
0cfac25
chore: renaming module name to e2e
chatton Jul 14, 2022
5753fa4
chore: remving commented out line from Dockerfile
chatton Jul 14, 2022
9ebbed4
chore: adding separate Makefile for e2e tests
chatton Jul 14, 2022
58a0fd5
chore: adding newline
chatton Jul 14, 2022
9b2ffba
chore: merge main
chatton Jul 14, 2022
1c2e239
chore: handling merge conflicts
chatton Jul 14, 2022
da2c8b9
chore: uncommenting line from Dockerfile
chatton Jul 14, 2022
48d7741
chore: adding PHONY to Makefile
chatton Jul 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,5 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run e2e Test
run: |
cd e2e
make e2e-test suite=${{ matrix.suite }} test=${{ matrix.test }}
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ FROM ubuntu:20.04

COPY --from=builder /go/build/simd /bin/simd

# TODO(chatton): uncomment once https://github.com/strangelove-ventures/ibctest/issues/183 is resolved.
#ENTRYPOINT ["simd"]
ENTRYPOINT ["simd"]
10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ MOCKS_DIR = $(CURDIR)/tests/mocks
HTTPS_GIT := https://github.com/cosmos/ibc-go.git
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8
TEST_CONTAINERS=$(shell docker ps --filter "label=ibc-test" -a -q)

export GO111MODULE = on

Expand Down Expand Up @@ -327,15 +326,6 @@ benchmark:
@go test -mod=readonly -bench=. $(PACKAGES_NOSIMULATION)
.PHONY: benchmark

cleanup-ibc-test-containers:
for id in $(TEST_CONTAINERS) ; do \
$(DOCKER) stop $$id ; \
$(DOCKER) rm $$id ; \
done

e2e-test: cleanup-ibc-test-containers
@go test -v ./e2e --run $(suite) -testify.m ^$(test)$$

###############################################################################
### Linting ###
###############################################################################
Expand Down
11 changes: 11 additions & 0 deletions e2e/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
DOCKER := $(shell which docker)
TEST_CONTAINERS=$(shell docker ps --filter "label=ibc-test" -a -q)

cleanup-ibc-test-containers:
for id in $(TEST_CONTAINERS) ; do \
$(DOCKER) stop $$id ; \
$(DOCKER) rm $$id ; \
done

e2e-test: cleanup-ibc-test-containers
@go test -v ./ --run $(suite) -testify.m ^$(test)$$
Comment on lines +4 to +11
Copy link
Contributor

@damiannolan damiannolan Jul 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not exactly a Makefile guru, but should these be .PHONY targets as they're not creating an output file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are absolutely correct, thanks for spotting that!

2 changes: 1 addition & 1 deletion e2e/fee_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/stretchr/testify/suite"

"github.com/cosmos/ibc-go/v4/e2e/testsuite"
"e2e/testsuite"
)

func TestFeeMiddlewareTestSuite(t *testing.T) {
Expand Down
142 changes: 142 additions & 0 deletions e2e/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
module e2e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this common practice? I would think the import should be "github.com/cosmos/ibc-go/e2e"? What would the differences be between using the different module paths?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was initially thinking of to do something like this, but opted to remove the ibc-go prefix to make it clear it is a separate entity. If you think it's better to have the fully qualified name we can always rename it.


go 1.18

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

require (
github.com/docker/docker v20.10.17+incompatible
github.com/strangelove-ventures/ibctest v0.0.0-20220713213153-930886d8db30
github.com/stretchr/testify v1.8.0
go.uber.org/zap v1.21.0
)

require (
filippo.io/edwards25519 v1.0.0-beta.2 // indirect
github.com/99designs/keyring v1.1.6 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/DataDog/zstd v1.4.5 // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/armon/go-metrics v0.4.0 // indirect
github.com/avast/retry-go/v4 v4.0.4 // indirect
github.com/benbjohnson/clock v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/btcsuite/btcd v0.22.0-beta // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/confio/ics23/go v0.7.0 // indirect
github.com/cosmos/btcutil v1.0.4 // indirect
github.com/cosmos/cosmos-sdk v0.45.6 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/iavl v0.17.3 // indirect
github.com/cosmos/ibc-go/v4 v4.0.0-rc0 // indirect
github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect
github.com/cosmos/ledger-go v0.9.2 // indirect
github.com/danieljoos/wincred v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/badger/v2 v2.2007.2 // indirect
github.com/dgraph-io/ristretto v0.0.3 // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/gateway v1.1.0 // indirect
github.com/gogo/protobuf v1.3.3 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rakyll/statik v0.1.7 // indirect
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
github.com/regen-network/cosmos-proto v0.3.1 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.12.0 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tendermint/btcd v0.1.1 // indirect
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tendermint/tendermint v0.34.19 // indirect
github.com/tendermint/tm-db v0.6.6 // indirect
github.com/zondax/hid v0.9.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.10 // indirect
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
google.golang.org/grpc v1.47.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/uint128 v1.1.1 // indirect
modernc.org/cc/v3 v3.36.0 // indirect
modernc.org/ccgo/v3 v3.16.6 // indirect
modernc.org/libc v1.16.7 // indirect
modernc.org/mathutil v1.4.1 // indirect
modernc.org/memory v1.1.1 // indirect
modernc.org/opt v0.1.1 // indirect
modernc.org/sqlite v1.17.3 // indirect
modernc.org/strutil v1.1.1 // indirect
modernc.org/token v1.0.0 // indirect
)
Loading