Skip to content

Maintenance: Missing test for function url authZ #1416

Closed
@heitorlessa

Description

@heitorlessa

Summary

Function URL latest introduction is missing a test without authorization fields. This will ensure code paths work when a function URL is configured as NONE for AuthType.

Test: https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/tests/functional/data_classes/test_lambda_function_url.py#L5

Why is this needed?

Completeness. Functional tests are covering only when IAM is set and not when NONE is set, this will help verify future AuthZ options added to Function URL, and uncover any side effect when these aren't available.

Which area does this relate to?

Event Handler - REST API

Solution

Rename test_lambda_function_url_event to test_lambda_function_url_event_iam, and create a new test test_lambda_function_url_event to cover NONE and all potential authZ keys that might not exist in Function URL

Acknowledgment

Metadata

Metadata

Assignees

Labels

tech-debtTechnical Debt tasks

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions