mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-09 00:02:50 -04:00
fix tests not being adjusted
This commit is contained in:
parent
1bc5d49d1d
commit
673d210fd8
@ -71,7 +71,7 @@ if RUBY_VERSION >= "2.4.0"
|
|||||||
|
|
||||||
crumb = Sentry.get_current_scope.breadcrumbs.peek
|
crumb = Sentry.get_current_scope.breadcrumbs.peek
|
||||||
assert crumb.category == "httpx"
|
assert crumb.category == "httpx"
|
||||||
assert crumb.data == { status: 200, method: "POST", url: uri, body: "foo&bar" }
|
assert crumb.data == { status: 200, method: "POST", url: uri, body: "foo=bar" }
|
||||||
ensure
|
ensure
|
||||||
Sentry.configuration.send_default_pii = before_pii
|
Sentry.configuration.send_default_pii = before_pii
|
||||||
end
|
end
|
||||||
@ -100,7 +100,7 @@ if RUBY_VERSION >= "2.4.0"
|
|||||||
verify_spans(transaction, response, verb: "GET")
|
verify_spans(transaction, response, verb: "GET")
|
||||||
crumb = Sentry.get_current_scope.breadcrumbs.peek
|
crumb = Sentry.get_current_scope.breadcrumbs.peek
|
||||||
assert crumb.category == "httpx"
|
assert crumb.category == "httpx"
|
||||||
assert crumb.data == { error: "Can't resolve unexisting", method: "GET", url: uri }
|
assert crumb.data == { error: "Can't resolve unexisting", method: "GET", url: uri.to_s }
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -7,12 +7,6 @@ module Requests
|
|||||||
module AWSAuthentication
|
module AWSAuthentication
|
||||||
AWS_URI = ENV.fetch("AMZ_HOST", "aws:4566")
|
AWS_URI = ENV.fetch("AMZ_HOST", "aws:4566")
|
||||||
|
|
||||||
def test_plugin_aws_authentication_mock_config
|
|
||||||
config = HTTPX::Plugins::AwsSdkAuthentication::Configuration.new("default")
|
|
||||||
assert config.respond_to?(:balls)
|
|
||||||
assert config.balls.nil?
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_plugin_aws_authentication_put_object
|
def test_plugin_aws_authentication_put_object
|
||||||
amz_uri = origin(AWS_URI)
|
amz_uri = origin(AWS_URI)
|
||||||
|
|
||||||
@ -47,6 +41,11 @@ module Requests
|
|||||||
})
|
})
|
||||||
.put("#{amz_uri}/test/testimage", body: "bucketz")
|
.put("#{amz_uri}/test/testimage", body: "bucketz")
|
||||||
verify_status(response, 200)
|
verify_status(response, 200)
|
||||||
|
|
||||||
|
# testing here to make sure the plugin is loaded
|
||||||
|
config = HTTPX::Plugins::AwsSdkAuthentication::Configuration.new("default")
|
||||||
|
assert config.respond_to?(:balls)
|
||||||
|
assert config.balls.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
Loading…
x
Reference in New Issue
Block a user