-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add the ability to override default IPNI endpoint #234
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #234 +/- ##
==========================================
- Coverage 71.10% 70.83% -0.27%
==========================================
Files 68 68
Lines 6063 6079 +16
==========================================
- Hits 4311 4306 -5
- Misses 1507 1528 +21
Partials 245 245
|
`lassie fetch` was hard-coded to always use `cid.contact`. The changes introduce a new flag `--ipniEndpoint` to allow overriding the default endpoint used to discover content providers. This feature is useful when debugging a local indexer instance or an explicit IPNI instance for content discovery/retrieval.
fd6cdd4
to
ad7b5e8
Compare
Thank you for the review @kylehuntsman 🙌 |
lassieOpts = append(lassieOpts, finderOpt) | ||
} else if cctx.IsSet("ipniEndpoint") { |
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.
Can we add some unit tests for this new cmd flag?
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.
we currently don't have tests that go down in to the cli, unfortunately, we mostly do integration tests through the daemon so most of the code in here isn't touched
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.
We can use a similar setup as go-car script test for lassie CLI
lassie fetch
was hard-coded to always usecid.contact
. The changes introduce a new flag--ipniEndpoint
to allow overriding the default endpoint used to discover content providers.This feature is useful when debugging a local indexer instance or an explicit IPNI instance for content discovery/retrieval.