Skip to content

Check Request ID format on S3 call for botocore instrumentation tests #750

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

Merged
merged 2 commits into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ install_requires =

[options.extras_require]
test =
moto[all] ~= 2.0
moto[all] ~= 2.2.6
opentelemetry-test == 0.25b1

[options.packages.find]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,17 @@ def test_s3_put(self):

location = {"LocationConstraint": "us-west-2"}
s3.create_bucket(Bucket="mybucket", CreateBucketConfiguration=location)
self.assert_span("S3", "CreateBucket")
self.assert_span(
"S3", "CreateBucket", request_id=_REQUEST_ID_REGEX_MATCH
)
self.memory_exporter.clear()

s3.put_object(Key="foo", Bucket="mybucket", Body=b"bar")
self.assert_span("S3", "PutObject")
self.assert_span("S3", "PutObject", request_id=_REQUEST_ID_REGEX_MATCH)
self.memory_exporter.clear()

s3.get_object(Bucket="mybucket", Key="foo")
self.assert_span("S3", "GetObject")
self.assert_span("S3", "GetObject", request_id=_REQUEST_ID_REGEX_MATCH)

@mock_sqs
def test_sqs_client(self):
Expand Down