From bae01526f73e36a3ecd02eee66209e9736334ec7 Mon Sep 17 00:00:00 2001 From: Darren Kelly Date: Mon, 25 Dec 2023 23:26:39 +0000 Subject: [PATCH] setup example tests --- .gitignore | 3 +- .idea/ktfmt.xml | 6 + .idea/thor.iml | 4 + .idea/vcs.xml | 6 + .idea/workspace.xml | 185 +- integration_tests/.gitignore | 134 + integration_tests/.mocharc.json | 7 + integration_tests/README.md | 13 + integration_tests/config/genesis.json | 67 - integration_tests/config/start.sh | 16 - integration_tests/contracts/Storage.sol | 25 + integration_tests/contracts/VIP180.sol | 26 + integration_tests/hardhat.config.ts | 29 + integration_tests/helpers/clauses.ts | 11 + integration_tests/helpers/connex.ts | 46 + integration_tests/helpers/contracts.ts | 13 + integration_tests/helpers/wallet.ts | 22 + integration_tests/network/config/genesis.json | 87 + .../network/config/health_check.sh | 22 + integration_tests/network/config/start.sh | 13 + .../{ => network}/docker-compose-base.yaml | 13 +- .../{ => network}/docker-compose.yaml | 16 +- .../keystore.json | 0 .../master.key | 0 .../keystore.json | 0 .../master.key | 0 .../keystore.json | 0 .../master.key | 0 .../keystore.json | 0 .../master.key | 0 integration_tests/package.json | 41 + integration_tests/scripts/generate-account.ts | 56 + integration_tests/test/accounts.test.ts | 15 + integration_tests/test/blocks.test.ts | 50 + integration_tests/test/contracts.test.ts | 28 + integration_tests/tsconfig.json | 11 + integration_tests/yarn.lock | 7175 +++++++++++++++++ 37 files changed, 7979 insertions(+), 161 deletions(-) create mode 100644 .idea/ktfmt.xml create mode 100644 .idea/thor.iml create mode 100644 .idea/vcs.xml create mode 100644 integration_tests/.gitignore create mode 100644 integration_tests/.mocharc.json create mode 100644 integration_tests/README.md delete mode 100644 integration_tests/config/genesis.json delete mode 100755 integration_tests/config/start.sh create mode 100644 integration_tests/contracts/Storage.sol create mode 100644 integration_tests/contracts/VIP180.sol create mode 100644 integration_tests/hardhat.config.ts create mode 100644 integration_tests/helpers/clauses.ts create mode 100644 integration_tests/helpers/connex.ts create mode 100644 integration_tests/helpers/contracts.ts create mode 100644 integration_tests/helpers/wallet.ts create mode 100644 integration_tests/network/config/genesis.json create mode 100755 integration_tests/network/config/health_check.sh create mode 100755 integration_tests/network/config/start.sh rename integration_tests/{ => network}/docker-compose-base.yaml (66%) rename integration_tests/{ => network}/docker-compose.yaml (70%) rename integration_tests/{ => network}/keys/0f872421dc479f3c11edd89512731814d0598db5/keystore.json (100%) rename integration_tests/{ => network}/keys/0f872421dc479f3c11edd89512731814d0598db5/master.key (100%) rename integration_tests/{ => network}/keys/435933c8064b4ae76be665428e0307ef2ccfbd68/keystore.json (100%) rename integration_tests/{ => network}/keys/435933c8064b4ae76be665428e0307ef2ccfbd68/master.key (100%) rename integration_tests/{ => network}/keys/f077b491b355e64048ce21e3a6fc4751eeea77fa/keystore.json (100%) rename integration_tests/{ => network}/keys/f077b491b355e64048ce21e3a6fc4751eeea77fa/master.key (100%) rename integration_tests/{ => network}/keys/f370940abdbd2583bc80bfc19d19bc216c88ccf0/keystore.json (100%) rename integration_tests/{ => network}/keys/f370940abdbd2583bc80bfc19d19bc216c88ccf0/master.key (100%) create mode 100644 integration_tests/package.json create mode 100644 integration_tests/scripts/generate-account.ts create mode 100644 integration_tests/test/accounts.test.ts create mode 100644 integration_tests/test/blocks.test.ts create mode 100644 integration_tests/test/contracts.test.ts create mode 100644 integration_tests/tsconfig.json create mode 100644 integration_tests/yarn.lock diff --git a/.gitignore b/.gitignore index 0d003a229..b84e132da 100644 --- a/.gitignore +++ b/.gitignore @@ -19,10 +19,9 @@ # private gopath /.build/ -package.json /node_modules/ /.vscode/ /vendor/ -.fake_gopath_suffix \ No newline at end of file +.fake_gopath_suffix diff --git a/.idea/ktfmt.xml b/.idea/ktfmt.xml new file mode 100644 index 000000000..f0d6dab42 --- /dev/null +++ b/.idea/ktfmt.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/thor.iml b/.idea/thor.iml new file mode 100644 index 000000000..7ee078df7 --- /dev/null +++ b/.idea/thor.iml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index dd61d9f9e..2ab702260 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,8 +5,21 @@ + + - + + + + + + + + + + + + + + + + @@ -117,6 +144,9 @@ + + @@ -125,90 +155,126 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - + + + + - - - - + + project + + $PROJECT_DIR$/integration_tests/node_modules/mocha + $PROJECT_DIR$/integration_tests + true + bdd + + SUITE + $PROJECT_DIR$/integration_tests/test/blocks.test.ts + + + - - + + project + + + $PROJECT_DIR$/integration_tests + true + bdd + --require ts-node/register + TEST + $PROJECT_DIR$/integration_tests/test/blocks.test.ts + + + + - - - - - + + project + + $PROJECT_DIR$/integration_tests/node_modules/mocha + $PROJECT_DIR$/integration_tests + true + bdd + + SUITE + $PROJECT_DIR$/integration_tests/test/contracts.test.ts + + + + + + + project + + $PROJECT_DIR$/integration_tests/node_modules/mocha + $PROJECT_DIR$/integration_tests + true + bdd + + TEST + $PROJECT_DIR$/integration_tests/test/contracts.test.ts + + + + - - - - + + + + + - - - + + + + + -