-
Notifications
You must be signed in to change notification settings - Fork 202
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
Add Makefile, bash scripts to test multiple nodes #20
Conversation
strided keys add validator3 --keyring-backend=test --home=$HOME/.strided/validator3 | ||
|
||
# change staking denom to uosmo | ||
cat $HOME/.strided/validator1/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="uosmo"' > $HOME/.strided/validator1/config/tmp_genesis.json && mv $HOME/.strided/validator1/config/tmp_genesis.json $HOME/.strided/validator1/config/genesis.json |
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.
should this be STRD? does it matter for testing?
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.
Don't think it matters too much for testing but great catch, we should change this to STRD
@@ -98,13 +96,13 @@ func (k msgServer) MintStAsset(ctx sdk.Context, sender sdk.AccAddress, amount in | |||
// It will panic if the module account does not exist or is unauthorized. | |||
sdkerror := k.bankKeeper.MintCoins(ctx, types.ModuleName, stCoins) | |||
if sdkerror != nil { | |||
k.Logger(ctx).Info("Failed to mint coins"); |
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.
were these breaking with semicolons at the end?
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.
I think this was a linter change
stride/app/app.go
Outdated
_ servertypes.Application = (*App)(nil) | ||
_ simapp.App = (*App)(nil) | ||
_ servertypes.Application = (*StrideApp)(nil) | ||
_ ibctesting.TestingApp = (*StrideApp)(nil) |
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.
why did we add this back?
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.
…uccessfully from this commit
… helpers for make test (eg in epochs keeper test); use custom config in app/genesis.go
benchmark \ | ||
build-docker-osmosisdnode localnet-start localnet-stop \ | ||
docker-single-node | ||
|
||
test: |
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.
The makefile now has three "test" targets.
- The first and second define recipes which run all the tests in the packages within the ./x/ folder and unit tests (many of which fail, as expected, since we haven't written these yet; I'm holding these tests are placeholders for now)
- The second runs unit tests too through
test-unit
dependency. This seems to run the same tests as the first recipe, but it breaks on error. I'm commenting this out for now to get things running since we wouldn't expect these unit tests to work, so we would not want to fail on them until we've written them properly. Added TODO(TEST-49) to write the unit tests properly. - It also tries to run a
test-build
dependency which doesn't exist (?)
- The second runs unit tests too through
- The third runs script/simple_test.sh, which works after I made a tweak to reset blockchain state (added the
--reset-once
flag
Is your intention to run the tests in each folder of the project or to run simple_test.sh? @asalzmann
- commented out test-unit in Makefile (we haeven't written unit tests yet!) - added blockchain reset arg to scripts/simple_test.sh
Some notes from fiddling with this: Issue 1: Validator 1 was silently dying after launching it on line 112
Same issue was occurring between runs because the old tmux processes were still running. An easy way to fix:
Helpful bash commands:
|
run "sh scripts/init.sh" to build working images to run 1 chain with 3 different nodes
added staketia to middleware stack
Summary
Add Makefile, scripts to run multiple nodes. Before testing ICA / ICQ, we'll need scripts to bootstrap validator nodes and send calls between them.
This is pulled from the Osmosis repo.
It doesn't quite work yet, possible we need to reconfigure something with docker
Test plan
make build
andmake test