diff --git a/README.md b/README.md index 72ee4f97..6c6052ef 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,21 @@ docker-compose exec opi-evpn-bridge grpcurl -plaintext -d '{"name" : "//network. ![OPI EVPN Bridge Diagram for L3VXLAN Symmetric IRB](./docs/OPI-EVPN-L3-Symmetric-IRB.png) ![OPI EVPN Bridge Diagram for L2VXLAN in_Symmetric IRB](./docs/OPI-EVPN-L2-VXLAN-In-Symmetric-IRB-setup.png) ![OPI EVPN Bridge Diagram for Leaf1_Detailed_View](./docs/OPI-EVPN-Leaf1-Detailed-View.png) + +## Tests + +Test your APIs even if unmerged using your private fork like this: + +```bash +chmod a+w go.* +docker run --rm -it -v `pwd`:/app -w /app golang:alpine go mod edit -replace github.com/opiproject/opi-api@main=github.com/YOURUSERNAME/opi-api@main +docker run --rm -it -v `pwd`:/app -w /app golang:alpine go get -u github.com/YOURUSERNAME/opi-api/storage/v1alpha1/gen/go@a98ca449468a +docker run --rm -it -v `pwd`:/app -w /app golang:alpine go mod tidy +``` + +Generate mocks like this: + +```bash +go install github.com/vektra/mockery/v2@latest +make mock-generate +```