Skip to content

Instantly share code, notes, and snippets.

@feuGeneA
Created June 12, 2020 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feuGeneA/b85acf0bc6cce3bc9687f83cd6d234ca to your computer and use it in GitHub Desktop.
Save feuGeneA/b85acf0bc6cce3bc9687f83cd6d234ca to your computer and use it in GitHub Desktop.
$ bt
yarn run v1.21.1
$ tsc -p tsconfig.json
Done in 12.42s.
yarn run v1.21.1
$ yarn test:rest && yarn test:rfqt
$ ETHEREUM_RPC_URL=http://localhost:8545 CHAIN_ID=1337 RFQT_API_KEY_WHITELIST='koolApiKey1,koolApikey2' RFQT_MAKER_ASSET_OFFERINGS='{"https://mock-rfqt1.club": [["0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c","0x0b1ba0af832d7c05fd64161e0db78e85978e8082"]]}' META_TXN_RELAY_ADDRESS=0x9eFCa436873b55a0d6AEa260f92DE50150360dca META_TXN_RELAY_PRIVATE_KEY=82b9c3b8d45f608badd8fda250a0d95088381540e850734519b659e1e1ac3e71 mocha --exclude lib/test/rfqt_test.js --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --timeout 200000 --exit
meta transactions tests
1) "before all" hook in "meta transactions tests"
2) "after all" hook in "meta transactions tests"
metrics tests
/metrics
✓ returns default prometheus metrics
✓ returns a custom metric correctly
serviceUtils test
getEstimatedGasTokenRefundInfo
✓ returns an estimate when there are gasTokens and bridge fills
✓ does not return an estimate when there are bridge fills but no gas tokens
✓ does not return an estimate when there are gas tokens but no bridge fills
Standard Relayer API (SRA) tests
3) "before all" hook in "Standard Relayer API (SRA) tests"
4) "after all" hook in "Standard Relayer API (SRA) tests"
/swap
5) "before all" hook in "/swap"
6) "after all" hook in "/swap"
transaction watcher signer tests
.getSortedSignersByAvailability
✓ sorts signers in order of highest balance andd lowest tx count
tx lifecycle
- submits a transaction
- marks a transaction as dropped if it has been seen then disappears
- unsticks a stuck transaction
6 passing (1m)
3 pending
6 failing
1) meta transactions tests
"before all" hook in "meta transactions tests":
Error: Timed out waiting for 0x-api logs
at Timeout._onTimeout (test/utils/deployment.ts:238:20)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
2) meta transactions tests
"after all" hook in "meta transactions tests":
Error: Command failed: lsof -ti :3000 | xargs kill -9
Usage:
kill [options] <pid> [...]
Options:
<pid> [...] send signal to every <pid> listed
-<signal>, -s, --signal <signal>
specify the <signal> to be sent
-l, --list=[<signal>] list all signal names, or convert one to a name
-L, --table list all signal names in a nice table
-h, --help display this help and exit
-V, --version output version information and exit
For more details see kill(1).
at ChildProcess.exithandler (child_process.js:295:12)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:430:11)
at Pipe.<anonymous> (net.js:658:12)
3) Standard Relayer API (SRA) tests
"before all" hook in "Standard Relayer API (SRA) tests":
Error: Old 0x-api instance has not been torn down
at Object.<anonymous> (test/utils/deployment.ts:37:15)
at Generator.next (<anonymous>)
at /home/gene/dev/0x-api/lib/test/utils/deployment.js:7:71
at new Promise (<anonymous>)
at __awaiter (lib/test/utils/deployment.js:3:12)
at Object.setupApiAsync (lib/test/utils/deployment.js:31:12)
at Object.<anonymous> (test/sra_test.ts:65:15)
at Generator.next (<anonymous>)
at /home/gene/dev/0x-api/lib/test/sra_test.js:7:71
at new Promise (<anonymous>)
at __awaiter (lib/test/sra_test.js:3:12)
at Context.<anonymous> (test/sra_test.ts:64:23)
at processImmediate (internal/timers.js:439:21)
4) Standard Relayer API (SRA) tests
"after all" hook in "Standard Relayer API (SRA) tests":
Error: Command failed: lsof -ti :3000 | xargs kill -9
Usage:
kill [options] <pid> [...]
Options:
<pid> [...] send signal to every <pid> listed
-<signal>, -s, --signal <signal>
specify the <signal> to be sent
-l, --list=[<signal>] list all signal names, or convert one to a name
-L, --table list all signal names in a nice table
-h, --help display this help and exit
-V, --version output version information and exit
For more details see kill(1).
at ChildProcess.exithandler (child_process.js:295:12)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
5) /swap
"before all" hook in "/swap":
Error: Old 0x-api instance has not been torn down
at Object.<anonymous> (test/utils/deployment.ts:37:15)
at Generator.next (<anonymous>)
at /home/gene/dev/0x-api/lib/test/utils/deployment.js:7:71
at new Promise (<anonymous>)
at __awaiter (lib/test/utils/deployment.js:3:12)
at Object.setupApiAsync (lib/test/utils/deployment.js:31:12)
at Object.<anonymous> (test/swap_test.ts:61:15)
at Generator.next (<anonymous>)
at /home/gene/dev/0x-api/lib/test/swap_test.js:7:71
at new Promise (<anonymous>)
at __awaiter (lib/test/swap_test.js:3:12)
at Context.<anonymous> (test/swap_test.ts:60:23)
at processImmediate (internal/timers.js:439:21)
6) /swap
"after all" hook in "/swap":
TypeError: Cannot read property 'revertAsync' of undefined
at Object.<anonymous> (test/swap_test.ts:117:35)
at Generator.next (<anonymous>)
at /home/gene/dev/0x-api/lib/test/swap_test.js:7:71
at new Promise (<anonymous>)
at __awaiter (lib/test/swap_test.js:3:12)
at Context.<anonymous> (test/swap_test.ts:116:22)
at processImmediate (internal/timers.js:439:21)
error Command failed with exit code 6.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 6.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment