Tonomy-Foundation / Tonomy-ID-Integration

Developer environment to run Tonomy ID locally alongside a blockchain node, and the demo app.
Apache License 2.0
0 stars 0 forks source link

Integration tests are part of Software Developer Kit repository and dont need integration repository #96

Closed theblockstalk closed 1 year ago

theblockstalk commented 1 year ago

Definition of done:

Output:

theblockstalk commented 1 year ago

>> = move -->> = copy

Strategy 1: move minimal functions to SDK Integration/blockchain (docker container + initialization) >> Tonomy Contracts/blockchain Integration/initialize (typescript bootstrap.ts) >> SDK/initialize-blockchain Integration/scripts/helsers.sh test() >> SDK/test.sh Integration/scripts/helpers.sh init() to now use Tonomy Contracts/blockchain Integration/test >> SDK/integration-test Integration/docker-compose -->> SDK/test.sh as a docker command which also initializes, from Tonomy Contracts/blockchain

SDK CI for integration test = run the test.sh command

theblockstalk commented 1 year ago

Strategy 2: multi-stage docker container Integration/blockchain (docker container + initialization) >> Tonomy Contracts/blockchain Integration/initialize (typescript bootstrap.ts) >> SDK/initialize-blockchain Integration/scripts/helsers.sh test() DELETE Integration/scripts/helpers.sh init() to now use Tonomy Contracts/blockchain Integration/test >> SDK/integration-test Integration/docker-compose -->> SDK/integration-tests/Dockerfile

Pros

Cons

Tonomy Contracts/blockchain Dockerfile

FROM eosio/eosio:v2.0.13

# setup Antelope node

RUN nodeos\
    -e\
    -p eosio\
    --data-dir /data/data-dir\
    --config-dir /var/config\
    --disable-replay-opts &
    # run in background

# intialize with initialize-blockchain.sh
# stop nodeos gracefully

CMD nodeos\
    -e\
    -p eosio\
    --data-dir /data/data-dir\
    --config-dir /var/config\
    --disable-replay-opts

SDC/integration-tests Dockerfile

FROM Tonomy Contracts/blockchain/Dockerfile

# install nodejs on same node manually, as we need to run nodeos

# initialize with bootstrap.ts

# run integration tests

SDK CI for integration test = run docker build command

theblockstalk commented 1 year ago

talked with @Rebal67. Agreed to go with Strategy 2

theblockstalk commented 1 year ago

TODO

theblockstalk commented 1 year ago

follow up work. create tasks for