refactor: create go.mod for simapp (#13130)
* Add go.mod for simapp * creating dep check script * new version of cosmos-sdk * tests/ must be a module also if it is to test simapp * maybe add a github action which should fail * mv tests/mocks -> testutil/mock * Refactor usages of tests/mocks * update build command * fix rosetta tests * go mod tidy * use cosmossdk.io/simapp * Update sim entrypoints * use simapp as a module * go mod tidy * Add replaced for vuln package * fix vuln dep * this CI run should fail * this CI run should succeed * use absolute path in makefile
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
|
||||
SIMAPP_REGEX="cosmossdk.io/simapp"
|
||||
CWD=$(pwd)
|
||||
|
||||
|
||||
find . -type f -name 'go.mod' -print0 | while IFS= read -r -d '' file
|
||||
do
|
||||
d=$(dirname "$file")
|
||||
if [[ "$d" =~ \./simapp$|\./tests$ ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if cd "$CWD/$d" && go list -test -f '{{ .Imports }}' ./... | grep -q -E "${SIMAPP_REGEX}"; then
|
||||
echo "${d} has a dependency on simapp!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
+8
-8
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mockgen_cmd="go run github.com/golang/mock/mockgen"
|
||||
$mockgen_cmd -source=client/account_retriever.go -package mocks -destination tests/mocks/account_retriever.go
|
||||
$mockgen_cmd -package mocks -destination tests/mocks/tendermint_tm_db_DB.go github.com/tendermint/tm-db DB
|
||||
$mockgen_cmd -source db/types.go -package mocks -destination tests/mocks/db/types.go
|
||||
$mockgen_cmd -source=types/module/module.go -package mocks -destination tests/mocks/types_module_module.go
|
||||
$mockgen_cmd -source=types/invariant.go -package mocks -destination tests/mocks/types_invariant.go
|
||||
$mockgen_cmd -source=types/router.go -package mocks -destination tests/mocks/types_router.go
|
||||
$mockgen_cmd -package mocks -destination tests/mocks/grpc_server.go github.com/gogo/protobuf/grpc Server
|
||||
$mockgen_cmd -package mocks -destination tests/mocks/tendermint_tendermint_libs_log_DB.go github.com/tendermint/tendermint/libs/log Logger
|
||||
$mockgen_cmd -source=client/account_retriever.go -package mock -destination testutil/mock/account_retriever.go
|
||||
$mockgen_cmd -package mock -destination testutil/mock/tendermint_tm_db_DB.go github.com/tendermint/tm-db DB
|
||||
$mockgen_cmd -source db/types.go -package mock -destination testutil/mock/db/types.go
|
||||
$mockgen_cmd -source=types/module/module.go -package mock -destination testutil/mock/types_module_module.go
|
||||
$mockgen_cmd -source=types/invariant.go -package mock -destination testutil/mock/types_invariant.go
|
||||
$mockgen_cmd -source=types/router.go -package mock -destination testutil/mock/types_router.go
|
||||
$mockgen_cmd -package mock -destination testutil/mock/grpc_server.go github.com/gogo/protobuf/grpc Server
|
||||
$mockgen_cmd -package mock -destination testutil/mock/tendermint_tendermint_libs_log_DB.go github.com/tendermint/tendermint/libs/log Logger
|
||||
$mockgen_cmd -source=orm/model/ormtable/hooks.go -package ormmocks -destination orm/testing/ormmocks/hooks.go
|
||||
$mockgen_cmd -source=x/nft/expected_keepers.go -package testutil -destination x/nft/testutil/expected_keepers_mocks.go
|
||||
$mockgen_cmd -source=x/feegrant/expected_keepers.go -package testutil -destination x/feegrant/testutil/expected_keepers_mocks.go
|
||||
|
||||
Reference in New Issue
Block a user