-
Notifications
You must be signed in to change notification settings - Fork 72
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
refactor: remove axios #1237
refactor: remove axios #1237
Conversation
7d3a5c5
to
7a1f63e
Compare
@@ -76,21 +73,4 @@ describe('persistTransaction', () => { | |||
.set('Accept', 'application/json') | |||
.expect(StatusCodes.INTERNAL_SERVER_ERROR); | |||
}); | |||
|
|||
it('should catch IPFS timeout error', async () => { |
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 decided to remove this test. it's a bit hard to replicate and I feel it has no real value
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 disagree with this. The Request Node still writes to IPFS but it should fail gracefully if for some reason that write fails.
expect(config.headers[httpConfigDefaults.requestClientVersionHeader]).toBe( | ||
packageJson.version, | ||
); |
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 ditched that test, I don't really see the intention
c33e957
to
0def2ba
Compare
d30f9c0
to
d27db26
Compare
9dec3a3
to
a2642ac
Compare
0def2ba
to
b7df198
Compare
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
FYI @benjlevesque, the |
|
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! ✨
|
||
it('specify the Request Client version in the header', async () => { |
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 couldn't find where we assert in this test that the client version is passed down in the headers. Is the test name wrong, or is this assertion missing?
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.
What was the conclusion here?
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 think it was a typo and it was renamed back to the original name. cc @benjlevesque can you confirm?
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.
yes, sorry my comment remained "pending":
good catch. Probably a bad merge or copy paste, I removed that test
but in the meantime I also added back a check on the version header
d68636a
to
8e03773
Compare
Motivation
Changing to MSW for mocks also has the benefit to be compatible with any client.
Choices
gas-price-definer
. This is never used, since feat!: drop legacy storage #1117IpfsStore.read
. This is never used.maxSize
fromIpfsManager.read
. This method is kept as a convenience, as it's useful to test theread
after upload, but is no longer used (since feat!: drop legacy storage #1117).axios
remains adevDependency
ofsmart-contracts
andtoolbox
for now