-
Notifications
You must be signed in to change notification settings - Fork 122
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
Fix: content-negotiation when fetching dataset from url #1153
Conversation
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.
The integration tests succeed so that means that the code actually works. The unit tests are going to fail though because of the changes. The big one is that it is now trying to do actual HTTP requests instead of mock requests. You'll have to mock the rdf-dereference
library now instead and probably do a few other changes there as well https://github.com/solid/community-server/blob/5e0f2e1e9582de6f853f60428ca086bccdff178c/test/unit/util/FetchUtil.test.ts#L8
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.
The error message made me realize where the problem is. I pulled the branch and verified the suggested changes work. There is still a test error but it's not related to the mock/types any more. My suggestions can probably also be cleaned up a bit if needed.
I think it looks good now. |
cb5027f
to
0ec74b0
Compare
Force pushed the new changes |
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.
Some minor issues remaining.
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.
Some very minor style nitpicks, will merge after those.
That should do it then |
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.
Looks good, thanks!
π Related issues
#1039
βοΈ Description
The reasoning behind this fix was to only use rdf-dereference when the
input
type isstring
. That is where the error seems to occur, other flows seem fine. (I might be wrong though)β PR check list
Before this pull request can be merged, a core maintainer will check whether