Open
Description
This issue is a sub-issue of #4476. It aims to add tests for jobs/aws_utils.py
, and ensure 100% coverage.
The generate_aws_eks_bearer_token
function currently uses get_aws_credentials_for_challenge
to generate aws_keys
.
- To isolate the tests for this function, I will use
unittests.mock
module to simulate external method behaviour such as simulatingboto3
sessions or aws credential generation, etc. - To verify if
Signer
object returns the correct URL with the accurate parameters, we patch theRequestSigned
method, and then code expected parameters as defined in function to assert they are equal. - And finally ensure that the URL returns the token when decoded at the end.
I will raise a PR implementing the above.
Metadata
Metadata
Assignees
Labels
No labels