@@ -98,7 +98,7 @@ def truncate_data(data):
98
98
elif key == "cloudwatch logs":
99
99
for cloudwatch_key in data["extra"]["cloudwatch logs"].keys():
100
100
if cloudwatch_key in ["url", "log_group", "log_stream"]:
101
- cleaned_data["extra"].setdefault("cloudwatch logs", {})[cloudwatch_key] = data["extra"]["cloudwatch logs"][cloudwatch_key]
101
+ cleaned_data["extra"].setdefault("cloudwatch logs", {})[cloudwatch_key] = data["extra"]["cloudwatch logs"][cloudwatch_key].split("=")[0]
102
102
103
103
if data.get("level") is not None:
104
104
cleaned_data["level"] = data.get("level")
@@ -228,7 +228,7 @@ def test_handler(event, context):
228
228
assert event ["extra" ]["lambda" ]["function_name" ].startswith ("test_" )
229
229
230
230
logs_url = event ["extra" ]["cloudwatch logs" ]["url" ]
231
- assert logs_url .startswith ("https://console.aws.amazon.com/cloudwatch/home?region= " )
231
+ assert logs_url .startswith ("https://console.aws.amazon.com/cloudwatch/home?region" )
232
232
assert not re .search ("(=;|=$)" , logs_url )
233
233
assert event ["extra" ]["cloudwatch logs" ]["log_group" ].startswith (
234
234
"/aws/lambda/test_"
@@ -370,7 +370,7 @@ def test_handler(event, context):
370
370
assert event ["extra" ]["lambda" ]["function_name" ].startswith ("test_" )
371
371
372
372
logs_url = event ["extra" ]["cloudwatch logs" ]["url" ]
373
- assert logs_url .startswith ("https://console.aws.amazon.com/cloudwatch/home?region= " )
373
+ assert logs_url .startswith ("https://console.aws.amazon.com/cloudwatch/home?region" )
374
374
assert not re .search ("(=;|=$)" , logs_url )
375
375
assert event ["extra" ]["cloudwatch logs" ]["log_group" ].startswith (
376
376
"/aws/lambda/test_"
@@ -462,23 +462,23 @@ def test_handler(event, context):
462
462
"X-Forwarded-Proto": "https"
463
463
},
464
464
"httpMethod": "GET",
465
- "path": "/path1 ",
465
+ "path": "/1 ",
466
466
"queryStringParameters": {
467
- "done": "false "
467
+ "done": "f "
468
468
},
469
- "dog ": "Maisey "
469
+ "d ": "D1 "
470
470
},
471
471
{
472
472
"headers": {
473
473
"Host": "x2.io",
474
474
"X-Forwarded-Proto": "http"
475
475
},
476
476
"httpMethod": "POST",
477
- "path": "/path2 ",
477
+ "path": "/2 ",
478
478
"queryStringParameters": {
479
- "done": "true "
479
+ "done": "t "
480
480
},
481
- "dog ": "Charlie "
481
+ "d ": "D2 "
482
482
}
483
483
]
484
484
""" ,
@@ -538,9 +538,9 @@ def test_handler(event, context):
538
538
request_data = {
539
539
"headers" : {"Host" : "x1.io" , "X-Forwarded-Proto" : "https" },
540
540
"method" : "GET" ,
541
- "url" : "https://x1.io/path1 " ,
541
+ "url" : "https://x1.io/1 " ,
542
542
"query_string" : {
543
- "done" : "false " ,
543
+ "done" : "f " ,
544
544
},
545
545
}
546
546
else :
0 commit comments