0KnowledgeNetwork / opt

mixnet server plugins, client apps, and other components
GNU Affero General Public License v3.0
2 stars 1 forks source link

Implement Unit and Integration Tests for Wallet Shield and HTTP Proxy Plugin #8

Open xendarboh opened 4 months ago

xendarboh commented 4 months ago

Tasks

Testing Strategy

Notes

Additional Info to provide

xendarboh commented 3 months ago

examples for how to test chain configurations using curl

With walletsheild running on port 7070, these are example tests with curl. Update the requested URL to match the network being tested.

# with local docker mixnet running, build and run walletshield client
cd apps/walletshield
make
./walletshield -config ../../docker/voting_mixnet/client/client.toml -listen :7070

Networks: ethereum, ethereum/sepolia

curl -i -X POST -H "Content-Type: application/json" -d '{"id":8626981455178653,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x54f9ea",false]}' --output - http://localhost:7070/ethereum

Networks: mina, mina/devnet

curl -i -X POST -H "Content-Type: application/json" -d '{"query":"\n  query ChainId {\n    daemonStatus {\n      chainId\n    }\n  }\n  ","variables":{},"operationName":"ChainId"}' --output - http://localhost:7070/mina/devnet