-
Notifications
You must be signed in to change notification settings - Fork 112
itest: have tapd skip cert verification #1190
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
base: master
Are you sure you want to change the base?
itest: have tapd skip cert verification #1190
Conversation
The mock oracle uses a self-signed certificate for TLS, but we're not concerned with having tapd verify it in the itest environment. This commit adds the 'experimental.rfq.priceoracletlsinsecure' flag added in lightninglabs/taproot-assets#1775 to the litd args list, instructing tapd not to verify certificates.
Summary of ChangesHello @jtobin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue in the integration test suite where Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces the --taproot-assets.experimental.rfq.priceoracletlsinsecure flag to the litd arguments in several integration tests. This change is necessary to allow tapd to skip TLS certificate verification when communicating with the mock oracle, which uses a self-signed certificate. The implementation is correct and effectively addresses the issue. My review includes a suggestion to define the new flag as a constant to improve code maintainability by reducing string literal duplication.
| "--taproot-assets.custodianproofretrievaldelay=500ms", | ||
| } | ||
| litdArgsTemplate = append(litdArgsTemplateNoOracle, []string{ | ||
| "--taproot-assets.experimental.rfq.priceoracletlsinsecure", |
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.
To improve maintainability and avoid repeating this string literal, consider defining it as a constant. This string is used four times in this file.
You can define the constant at the file level, for example before the var block at line 59:
const priceOracleTlsInsecure = "--taproot-assets.experimental.rfq.priceoracletlsinsecure"Then, use this constant here and in the other three locations where this string appears (lines 103, 4129, and 4978).
| "--taproot-assets.experimental.rfq.priceoracletlsinsecure", | |
| priceOracleTlsInsecure, |
(Depends on lightninglabs/taproot-assets#1775.)
The mock oracle uses a self-signed certificate for TLS, but we're not concerned with having tapd verify it in the itest environment. This commit adds the 'experimental.rfq.priceoracletlsinsecure' flag to the litd args list, instructing tapd not to verify certificates.