-
Notifications
You must be signed in to change notification settings - Fork 0
test: snp server integration tests #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Vercel deployment URL: https://signer-metrics-9s833culc-hirosystems.vercel.app 🚀 |
@@ -21,6 +21,7 @@ | |||
"migrate": "ts-node node_modules/.bin/node-pg-migrate -j ts", | |||
"lint": "eslint .", | |||
"lint:fix": "eslint . --fix", | |||
"vendor-secp256k1": "mkdir -p src/vendored/@noble/secp256k1 && cp node_modules/@noble/secp256k1/index.ts src/vendored/@noble/secp256k1/index.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This library is esm-only, which jest is unable to handle. Luckily we can simply copy the single ts source file of this library into our repo and it is compiled to cjs. This a hacky workaround, and the approach is unlikely to work with most other other esm-only dependencies. The long term solution is to move away from jest.
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LFG
Implement integration test for ingesting msgs from the SNP server.
This jest startup script now orchestrates a spin up of the SNP server via the
hirosystems/salt-n-pepper
docker container, along with it's dependencies (redis, pg).In
ingestion.test.ts
, a dump of events captured from a stacks-node is POSTed to the SNP server (simulating a real stacks-node), and then the signer-metrics-api msg ingestion is started and tested to ensure events are consumed correctly and fully.