Skip to content

Commit c26f783

Browse files
authored
Comment out botocore test (#1089)
1 parent 145a14e commit c26f783

File tree

1 file changed

+30
-29
lines changed

1 file changed

+30
-29
lines changed

instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_instrumentation.py

+30-29
Original file line numberDiff line numberDiff line change
@@ -103,35 +103,36 @@ def test_s3_client(self):
103103
),
104104
)
105105

106-
@mock_s3
107-
def test_s3_put(self):
108-
params = dict(Key="foo", Bucket="mybucket", Body=b"bar")
109-
s3 = self.session.create_client("s3", region_name="us-west-2")
110-
s3.create_bucket(Bucket="mybucket")
111-
s3.put_object(**params)
112-
113-
spans = self.memory_exporter.get_finished_spans()
114-
assert spans
115-
span = spans[0]
116-
self.assertEqual(len(spans), 2)
117-
self.assertEqual(span.attributes["aws.operation"], "CreateBucket")
118-
assert_span_http_status_code(span, 200)
119-
self.assertEqual(
120-
span.resource,
121-
Resource(
122-
attributes={"endpoint": "s3", "operation": "createbucket"}
123-
),
124-
)
125-
self.assertEqual(spans[1].attributes["aws.operation"], "PutObject")
126-
self.assertEqual(
127-
spans[1].resource,
128-
Resource(attributes={"endpoint": "s3", "operation": "putobject"}),
129-
)
130-
self.assertEqual(spans[1].attributes["params.Key"], str(params["Key"]))
131-
self.assertEqual(
132-
spans[1].attributes["params.Bucket"], str(params["Bucket"])
133-
)
134-
self.assertTrue("params.Body" not in spans[1].attributes.keys())
106+
# Comment test for issue 1088
107+
# @mock_s3
108+
# def test_s3_put(self):
109+
# params = dict(Key="foo", Bucket="mybucket", Body=b"bar")
110+
# s3 = self.session.create_client("s3", region_name="us-west-2")
111+
# s3.create_bucket(Bucket="mybucket")
112+
# s3.put_object(**params)
113+
114+
# spans = self.memory_exporter.get_finished_spans()
115+
# assert spans
116+
# span = spans[0]
117+
# self.assertEqual(len(spans), 2)
118+
# self.assertEqual(span.attributes["aws.operation"], "CreateBucket")
119+
# assert_span_http_status_code(span, 200)
120+
# self.assertEqual(
121+
# span.resource,
122+
# Resource(
123+
# attributes={"endpoint": "s3", "operation": "createbucket"}
124+
# ),
125+
# )
126+
# self.assertEqual(spans[1].attributes["aws.operation"], "PutObject")
127+
# self.assertEqual(
128+
# spans[1].resource,
129+
# Resource(attributes={"endpoint": "s3", "operation": "putobject"}),
130+
# )
131+
# self.assertEqual(spans[1].attributes["params.Key"], str(params["Key"]))
132+
# self.assertEqual(
133+
# spans[1].attributes["params.Bucket"], str(params["Bucket"])
134+
# )
135+
# self.assertTrue("params.Body" not in spans[1].attributes.keys())
135136

136137
@mock_sqs
137138
def test_sqs_client(self):

0 commit comments

Comments
 (0)