Document local cli tests
This commit is contained in:
@@ -81,7 +81,7 @@ func Execute(rootCmd *cobra.Command) error {
|
||||
ctx = context.WithValue(ctx, client.ClientContextKey, &client.Context{})
|
||||
ctx = context.WithValue(ctx, server.ServerContextKey, server.NewDefaultContext())
|
||||
|
||||
executor := tmcli.PrepareBaseCmd(rootCmd, "", app.DefaultNodeHome)
|
||||
executor := tmcli.PrepareBaseCmd(rootCmd, "WM", app.DefaultNodeHome)
|
||||
return executor.ExecuteContext(ctx)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -o errexit -o nounset -o pipefail
|
||||
|
||||
BASE_ACCOUNT=$(wasmcli keys show validator -a)
|
||||
wasmcli q account "$BASE_ACCOUNT" -o json | jq
|
||||
|
||||
echo "## Add new account"
|
||||
wasmcli keys add fred
|
||||
|
||||
@@ -11,7 +12,7 @@ NEW_ACCOUNT=$(wasmcli keys show fred -a)
|
||||
wasmcli q bank balances "$NEW_ACCOUNT" -o json || true
|
||||
|
||||
echo "## Transfer tokens"
|
||||
wasmcli tx send "$BASE_ACCOUNT" "$NEW_ACCOUNT" 1ustake --gas 1000000 -y --chain-id=testing --node=http://localhost:26657 -b block | jq
|
||||
wasmcli tx send validator "$NEW_ACCOUNT" 1ustake --gas 1000000 -y --chain-id=testing --node=http://localhost:26657 -b block | jq
|
||||
|
||||
echo "## Check balance again"
|
||||
wasmcli q bank balances "$NEW_ACCOUNT" -o json | jq
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -o errexit -o nounset -o pipefail
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||||
@@ -11,7 +11,7 @@ RESP=$(wasmcli tx wasm store "$DIR/../../x/wasm/internal/keeper/testdata/hackato
|
||||
CODE_ID=$(echo "$RESP" | jq -r '.logs[0].events[0].attributes[-1].value')
|
||||
echo "* Code id: $CODE_ID"
|
||||
echo "* Download code"
|
||||
TMPDIR=$(mktemp -t wasmcli)
|
||||
TMPDIR=$(mktemp -t wasmcliXXXX)
|
||||
wasmcli q wasm code "$CODE_ID" "$TMPDIR"
|
||||
rm -f "$TMPDIR"
|
||||
echo "-----------------------"
|
||||
|
||||
@@ -3,4 +3,20 @@ For manual testing. Works on my box(*) ...
|
||||
|
||||
|
||||
|
||||
*) OSX
|
||||
*) OSX
|
||||
|
||||
```
|
||||
make install
|
||||
cd contrib/local
|
||||
rm -rf /tmp/trash
|
||||
HOME=/tmp/trash bash setup_wasmd.sh
|
||||
HOME=/tmp/trash bash start_node.sh
|
||||
```
|
||||
|
||||
Next shell:
|
||||
|
||||
```
|
||||
cd contrib/local
|
||||
./01-accounts.sh
|
||||
./02-contracts.sh
|
||||
```
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -o errexit -o nounset -o pipefail
|
||||
|
||||
PASSWORD=${PASSWORD:-1234567890}
|
||||
|
||||
Reference in New Issue
Block a user