-
Notifications
You must be signed in to change notification settings - Fork 822
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
cmd/exchange_template: Update docs #1494
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1494 +/- ##
==========================================
- Coverage 37.75% 35.90% -1.86%
==========================================
Files 411 411
Lines 147817 177595 +29778
==========================================
+ Hits 55815 63758 +7943
- Misses 84218 106055 +21837
+ Partials 7784 7782 -2
|
cmd/exchange_template/test_file.tmpl
Outdated
@@ -36,6 +36,7 @@ func TestMain(m *testing.M) { | |||
{{ if .WS }} exchCfg.API.AuthenticatedWebsocketSupport = true {{ end }} | |||
exchCfg.API.Credentials.Key = apiKey | |||
exchCfg.API.Credentials.Secret = apiSecret | |||
exchCfg.Enabled = true |
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.
Is there anything else that should be changed? I only ask because there is no other TestMain
in /exchanges/
that has this present and they work with authenticated endpoints. If this is an issue for them, could you update all of those?
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.
Never mind! Vague error messages led me here, but the fundamental issue was no assets/pairs being set in configtest.json on initial generation, which is the more graceful fix in general.
Maybe we could leave a comment about that somewhere in this tool, or in the files generated by it?
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.
All G! Yeah that's fine. Adding some details to suggest that you should populate configtest.json with asset/pairs before running tests would be good. Whether it's in ADD_NEW_EXCHANGE.md, commentary in the tool or otherwise I'm happy with. We're lacking in documentation, so any extra details is appreciated
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.
I've now done so in the printed output from running the tool. Please let me know what you think of the wording there.
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.
Nice. Thanks for adding the expanded comment
Will be keeping this open for additional improvements to the exchange impl tools/docs up until Bitget is finished as @cranktakular goes through it |
Thank you for this change, and for keeping the PR open. |
PR Description
If the exchange config isn't enabled, then the default setup function in the wrapper won't do anything with the config passed to it, causing any authentication to not be set. And thus, causing anything which uses authentication to fail.
Type of change
Please delete options that are not relevant and add an
x
in[]
as item is complete.How has this been tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and
also consider improving test coverage whilst working on a certain feature or package.
Checklist