forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(indy-testnet): improve setup and tools of indy-testnet
req_discounted_cartrade.py - reuse proof when possible, add new flags to force new proof generation and to ignore discounted-cartrade request to simplify tests, put this tool into container. testsock.js - fix formatting, add missing package, use new validator address (nginx). Refactor all indy-testnet docerfiles according to docker best practices, reduce container size and complexity. Use nginx as a proxy to validator (as documented). Closes: hyperledger-cacti#1812 Signed-off-by: Michal Bajer <[email protected]>
- Loading branch information
Showing
13 changed files
with
274 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Simple tool for setup and sending requests to discounted-cartrade sample app | ||
# Run as part of docker-compose or remember to use host network | ||
|
||
FROM clientbase | ||
|
||
# Default IP for test indy pool on localhost | ||
ENV TEST_POOL_IP 172.16.0.2 | ||
|
||
USER root | ||
RUN mkdir -p "/etc/cactus/indy-validator/" && chown -R indy "/etc/cactus/" | ||
VOLUME [ "/etc/cactus/" ] | ||
|
||
USER indy | ||
WORKDIR /home/indy | ||
COPY --chown=indy:indy './req_discounted_cartrade.py' './src/' | ||
RUN cp 'from-indy-sdk/utils.py' './src/' | ||
|
||
ENTRYPOINT [ "python3", "-m", "src.req_discounted_cartrade" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# req_discounted_cartrade | ||
|
||
Simple tool for setup and sending requests to discounted-cartrade sample app | ||
|
||
# How to use | ||
- Setup discounted-cartrade first | ||
- Build clientbase from `tools/docker/indy-testnet/clientbase` | ||
- Build this container `docker build . -t req_discounted_cartrade` | ||
- `mkdir -p /etc/cactus/indy-validator/` | ||
|
||
## Usage | ||
|
||
### Generate proof only | ||
- Will replace existing proof file (like called with -f flag) | ||
|
||
``` | ||
docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="host" req_discounted_cartrade --proof_only | ||
``` | ||
|
||
### Send discounted-cartrade request | ||
``` | ||
docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="host" req_discounted_cartrade | ||
``` | ||
|
||
### Recreate the proof and send discounted-cartrade request | ||
``` | ||
docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="host" req_discounted_cartrade --force | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"jsonwebtoken": "^8.5.1", | ||
"socket.io-client": "4.1.3" | ||
} | ||
} |
Oops, something went wrong.