Commit 26d0f143 authored by George C. Knee's avatar George C. Knee Committed by GitHub

docs: add guidance around Go tests (#9380)

* docs: add guidance around go tests

* docs: tweak instruction

* add instruction to run tests with make

* suggest deleteing artifacts directory

* settle on foundry update route
parent 02987acc
...@@ -164,7 +164,7 @@ docker compose logs --follow <service name> ...@@ -164,7 +164,7 @@ docker compose logs --follow <service name>
Before running tests: **follow the above instructions to get everything built.** Before running tests: **follow the above instructions to get everything built.**
#### Running unit tests #### Running unit tests (typescript)
Run unit tests for all packages in parallel via: Run unit tests for all packages in parallel via:
...@@ -179,6 +179,16 @@ cd packages/package-to-test ...@@ -179,6 +179,16 @@ cd packages/package-to-test
pnpm test pnpm test
``` ```
#### Running unit tests (Go)
Change directory to the package you want to run tests for. Then:
```shell
go test ./...
```
#### Running e2e tests (Go)
See [this document](./op-e2e/README.md)
#### Running contract static analysis #### Running contract static analysis
We perform static analysis with [`slither`](https://github.com/crytic/slither). We perform static analysis with [`slither`](https://github.com/crytic/slither).
......
...@@ -19,3 +19,16 @@ runtime, but others cannot be changed or else it will result in ...@@ -19,3 +19,16 @@ runtime, but others cannot be changed or else it will result in
broken tests. Any changes to `devnetL1.json` should result in broken tests. Any changes to `devnetL1.json` should result in
rebuilding the `.devnet` artifacts before the new values will rebuilding the `.devnet` artifacts before the new values will
be present in the `op-e2e` tests. be present in the `op-e2e` tests.
## Running tests
Consult the [Makefile](./Makefile) in this directory. Run, e.g.:
```bash
make test-http
```
### Troubleshooting
If you encounter errors:
* ensure you have the latest version of foundry installed: `pnpm update:foundry`
* try deleting the `packages/contracts-bedrock/forge-artifacts` directory
* if the above step doesn't fix the error, try `pnpm clean`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment