Skip to content

Commit c42a4eb

Browse files
committed
Fixing one test
1 parent d481e29 commit c42a4eb

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

tests/integrations/aws_lambda/test_aws.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
import pytest
3838

3939
RUNTIMES_TO_TEST = [
40-
"python3.8",
41-
"python3.9",
42-
"python3.10",
43-
"python3.11",
40+
# "python3.8",
41+
# "python3.9",
42+
# "python3.10",
43+
# "python3.11",
4444
"python3.12",
4545
]
4646

@@ -590,7 +590,7 @@ def test_traces_sampler_gets_correct_values_in_sampling_context(
590590

591591
import inspect
592592

593-
_, response = run_lambda_function(
593+
function_code = (
594594
LAMBDA_PRELUDE
595595
+ dedent(inspect.getsource(StringContaining))
596596
+ dedent(inspect.getsource(DictionaryContaining))
@@ -621,7 +621,7 @@ def test_handler(event, context):
621621
{
622622
"http.request.method": "GET",
623623
"url.path": "/sit/stay/rollover",
624-
"url.query": "repeat=again",
624+
"url.query": "repeat=twice",
625625
"url.full": "http://x.io/sit/stay/rollover?repeat=twice",
626626
"network.protocol.name": "http",
627627
"server.address": "x.io",
@@ -643,10 +643,15 @@ def test_handler(event, context):
643643
traces_sampler=traces_sampler,
644644
)
645645
"""
646-
),
647-
b'{"httpMethod": "GET", "path": "/sit/stay/rollover", "query_string": {"repeat": "again"}, "headers": {"Host": "x.io", "X-Forwarded-Proto": "http", "Custom-Header": "Custom Value"}}',
646+
)
648647
)
649648

649+
payload = b'{"httpMethod": "GET", "path": "/sit/stay/rollover", "queryStringParameters": "repeat=twice", "headers": {"Host": "x.io", "X-Forwarded-Proto": "http", "Custom-Header": "Custom Value"}}'
650+
651+
_, response = run_lambda_function(
652+
code=function_code,
653+
payload=payload,
654+
)
650655
assert response["Payload"]["AssertionError raised"] is False
651656

652657

0 commit comments

Comments
 (0)