-
Notifications
You must be signed in to change notification settings - Fork 27
Fix issue where read_to_end() into provided rx_buf does not work with… #115
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
Conversation
// Also, if requests on embedded platforms fail with Error::Dns, then try to | ||
// enable the "alloc" feature on embedded-tls to enable RSA ciphers. | ||
let mut request = client | ||
.request(Method::GET, "https://api.dictionaryapi.dev/api/v2/entries/en/orange") |
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 a way to test this without actually hitting this external API? We probably don't want the test to start failing if this website ever goes dark.
@lulf do you have any good idea on how we could setup a test harness that can recreate this issue? |
I wonder if there is something similar to Verify for rust, where we could load desired responses raw from disk, and then compare them to a desired and expected response. |
Hmm, I'm not familiar with any appropriate mocking framework, but maybe one could use something like https://github.com/drogue-iot/embedded-tls/blob/main/tests/tlsserver.rs to reproduce it. It requires a bit more work to setup though. |
Are there more potential uses for something like https://github.com/drogue-iot/embedded-tls/blob/main/tests/tlsserver.rs in this repo, or is this going into the territory of testing |
I also ran into this issue. Any updates on this? |
Unless anyone has a good idea on how to proper test this, i guess we have to merge this as is. @lulf what do you think? |
Maybe we can just switch to calling a different API in the tests (something more stable, with less chance of being shut down)? Or delete the test entirely (as much as it pains me to say that). |
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.
Let's merge it, we don't run the ci / tests that often 🙈
… tls
This is a fix for #114. The issue is that
embedded-tls
may provide a different buffer when callingbuf_read()
than we expect, so this PR allows us to force to not use its buffer.