43 Commits

Author SHA1 Message Date
HoneyryderChuck
9faed647bf remove raise-error middleware from faraday tests
proves that the adapter does not raise on http errors. also added a test to ensure that
2025-03-18 22:42:38 +00:00
HoneyryderChuck
8eeafaa008 omit faraday/datadog tests which uncovered a bug 2025-02-11 00:46:18 +00:00
HoneyryderChuck
f2bca9fcbf altered datadog tests in order to verify the distributed headers from the response body
and not from the request object, which reproduces the bug
2025-02-11 00:46:18 +00:00
HoneyryderChuck
016ed04f61 adding test for integration of datadog on top of faraday backed by httpx 2025-02-11 00:46:18 +00:00
HoneyryderChuck
5b59011a89 moving datadog setup test to support mixin 2025-02-11 00:31:13 +00:00
Earlopain
a4b95db01c Fix webmock integration when posting tempfiles
The fix is two-fold and also allows them to be retryable

Closes https://gitlab.com/os85/httpx/-/issues/320
2024-11-06 13:27:45 +00:00
HoneyryderChuck
3e504fb511 fix for webmock request body expecting a string
when building the request signature, the body is preemptively converted to a string, which fulfills the expectation for webmock, despite it being a bit of a perf penalty if the request contains a multipart request body, as the body will be fully read to memory

Closes #319

Closes https://github.com/HoneyryderChuck/httpx/issues/65
2024-10-31 17:47:12 +00:00
Alexey Romanov
4a966d4cb8 Add a regression test for WebMock with form/multipart 2024-10-25 13:43:12 +01:00
HoneyryderChuck
9a3ddfd0e4 change datadog v2 constraint to not test against beta version
Fixes #310
2024-07-10 15:50:14 +01:00
HoneyryderChuck
1f7a251925 updated datadog 2.0 prerelease tag 2024-03-22 18:49:08 +00:00
HoneyryderChuck
3d9779cc63 adapt to datadog gem upcoming changes
names changes from ddtrace to datadog, as well as namespace
2024-03-22 13:44:16 +00:00
HoneyryderChuck
51a8b508ac fix: datadog not generating new span on retried requests
spans initiation gate wasn't being reset in the case of retries, which
reuse the same object; a redesign was done to ensure the span initiates
before really sending the request, is reused when the request object is
reset and reused, and when the error happens outside of the request
transaction, such as during name resolution.
2024-03-22 12:51:15 +00:00
Tony Hsu
be5a91ce2e ddtrace 2.0 changes 2024-03-11 22:46:42 +00:00
HoneyryderChuck
97c44a37ae added webmock test for plain-text response with content-encoding headerr 2023-12-05 19:41:49 +00:00
HoneyryderChuck
793840f762 fixed integration test lint 2023-11-26 00:39:57 +00:00
HoneyryderChuck
f1bd41fada fixing datadog trace id extraction in tests
ddtrace 1.17.0 enables 128-bit trace ids by default
2023-11-26 00:26:48 +00:00
HoneyryderChuck
79756e4ac4 small cleanup in type definitions and webmock testing 2023-11-22 11:07:54 +00:00
HoneyryderChuck
b0dfe68ebe stream plugin: do not cache intermediate responses
this had the effect of storing redirect responses and using them solely for inferences on the each chunk block, instead of the final response

Closes #282
2023-11-21 10:21:13 +00:00
HoneyryderChuck
fa513a9ac9 stream plugin: fix #each loop when used with webmock
when response would be called inside the #each block, the webmock trigger would inject the body before attaching the response object to the request, thereby retriggering #each in a loop

Closes #281
2023-11-21 10:08:29 +00:00
HoneyryderChuck
716e98af5b stream plugin: fix #each_line not yielding last chunk
the last line of the payload wasn't being yielded unless the last character of the payload was a newliine. this was overlooked for a time due to stream plugin being built for text/event-stream mime type, which follows that rule, as per what the tests cover.
2023-11-20 22:38:47 +00:00
HoneyryderChuck
b82e57c281 ad test for integration of webmock with follow_redirects and stream plugins 2023-11-19 22:43:30 +00:00
HoneyryderChuck
1bebb179ce load httpx sentry patch for tests 2023-11-12 15:31:38 +00:00
HoneyryderChuck
d859c3a1eb remove support for older (< v1) versions of dddtrace in the datadog plugin 2023-09-20 17:57:41 +01:00
HoneyryderChuck
477c3601fc eliminated blocks testing for ruby < 2.7 2023-09-20 17:57:05 +01:00
HoneyryderChuck
afead02c46 eliminate deprecated MiniTest module 2023-07-27 00:02:11 +01:00
HoneyryderChuck
1765ddf0f8 fixed test match 2023-05-01 01:19:43 +01:00
HoneyryderChuck
b154d97438 readd error message on failed resolution 2023-05-01 00:45:35 +01:00
HoneyryderChuck
b13b0f86eb Revert "dns errors: raise error immediately on nxdomain error"
This reverts commit 04c5b39600e36ebb38884ff9285cdd66d933d70e.
2023-04-29 23:15:46 +01:00
HoneyryderChuck
04c5b39600 dns errors: raise error immediately on nxdomain error
no need to loop into candidates.
2023-04-25 22:46:54 +01:00
Kevin Elliott
5108a6247f Fix WebMock adapter so that it gets disabled when WebMock gets disabled 2023-04-25 07:25:07 +00:00
HoneyryderChuck
673d210fd8 fix tests not being adjusted 2023-04-18 02:34:11 +03:00
HoneyryderChuck
1bc5d49d1d bugfix: sentry adapter breadcrumbs didn't work
wrong variable used, and wrong error message accessors. Added
regressioon tests with breadcrumbs enabled and error response test.
2023-04-18 02:09:12 +03:00
HoneyryderChuck
092e594a4b Request.verb is now an upcased string (ex: "GET")
The reference for a request verb is now the string which is used
everywhere else, instead of the symbol corresponding to it. This was an
artifact from the import from httprb, and there is no advantage in it,
since these strings are frozen in most use cases, and the
transformations from symbol to strings being performed everywhere are
prooof that keeping the atom isn't really bringing any benefit.
2023-04-17 16:54:31 +03:00
HoneyryderChuck
73f0d609b0 fix datadog tests, both gem version compare and error type
error type has been wrongly tested sofar. This commit fixes it.
2023-03-28 01:37:06 +01:00
HoneyryderChuck
1205c6964f load integrations by default when possible
this way, one can document a less special migration path, and even
change integration dirs if so desired.
2022-12-29 00:05:03 +00:00
HoneyryderChuck
d09b107314 dealing with datadog breaking change better 2022-12-21 00:45:26 +00:00
HoneyryderChuck
e301811196 fixed datadog recent change for error tag 2022-12-21 00:31:42 +00:00
HoneyryderChuck
7383347147 implementation of the sentry plugin integration 2022-05-27 16:02:52 +01:00
HoneyryderChuck
281ac03cda added tests and scaffold 2022-05-26 23:45:20 +01:00
HoneyryderChuck
42bcfd3a93 adapting datadog plugin to datadog 1.0 release 2022-05-06 13:15:07 +01:00
HoneyryderChuck
411e8d0ab1 fixed linting 2022-02-24 01:27:06 +00:00
Thomas Cannon
f7bcc27385
Fix WebMock adapter to use request.query to build request signature
* Webmock allows users to stub a request using a URI with query
	parameters, as a shortcut instead of using `with...`
	* The Webmock adapter did not construct a URI that included the
		`request.query`, causing stubs that had the same host/path, but
		different queries, to return incorrect results
2022-02-23 11:08:59 -05:00
HoneyryderChuck
b700a4f994 bootstrapping standalone tests, test which need to run in full-isolation mode (own process), where proxy intgration via env var is tested 2022-01-12 01:43:08 +02:00