Skip to content

Commit

Permalink
Merge branch 'ph/e2e-tutorial' of https://github.com/cosmos/interchai…
Browse files Browse the repository at this point in the history
…n-security into ph/e2e-tutorial
  • Loading branch information
p-offtermatt committed Dec 6, 2023
2 parents 470ee26 + 2dae5b9 commit f2f88d0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ there is likely no existing action to submit these transactions to the chain.

You can see the basic template for how to do this by looking at the actions in
(actions.go)[actions.go].
The basic principle is to use exec.Command to execute a docker exec to execute a
command inside the docker container.
The basic principle is to use `exec.Command` to execute a command inside the docker container.
The pattern for this looks something like this:
```
cmd := exec.Command("docker", "exec",
Expand All @@ -133,7 +132,7 @@ if err != nil {
// potentially check something in the output, or log something, ...
```

Remember that actions don't need to check that the state was modified correctly,
**Note:** Actions don't need to check that the state was modified correctly,
since we have the state checks for this.
Still, it's generally a good idea to do a basic check for errors,
since in case the action encounters an error,
Expand Down Expand Up @@ -208,7 +207,7 @@ When something in the tests goes wrong, a nice thing about the tests is that the
docker container doesn't get killed.
You can sh into the docker container via e.g. `docker exec -it "testinstance" sh` and manually look around.
Useful pointers are:
* Look at logs in the node homes: `/$CHAIN_ID/validator$VAL_ID`
* Look at logs in the nodes' home folder, i.e., `/$CHAIN_ID/validator$VAL_ID`
* Query/Run txs on the running apps (find out the relevant addresses and node homes to use e.g. by running `htop "binaryname"`)

It is also possible to locally change a step so it will *always* fail (e.g. by checking for nonsense validator balances)
Expand Down

0 comments on commit f2f88d0

Please sign in to comment.