Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_function_configuration support for Lambda #3562

Merged

Conversation

enoodle
Copy link
Contributor

@enoodle enoodle commented Dec 22, 2020

This adds support for boto3.client('lambda').get_function_configuration(FunctionName='blalbla')

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR @enoodle! Left a few comments.

moto/awslambda/responses.py Outdated Show resolved Hide resolved
moto/awslambda/responses.py Outdated Show resolved Hide resolved
)
result["Version"].should.equal("$LATEST")
result["FunctionArn"].should.equal(
"arn:aws:lambda:us-west-2:{}:function:testFunction:$LATEST".format(ACCOUNT_ID)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The region can also be formatted, with _lambda_region

)

result = conn.get_function_configuration(FunctionName="testFunction")
# this is hard to match against, so remove it
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we need to remove these keys, as we're not verifying equality on the entire dict.

@enoodle enoodle force-pushed the adding_lambda_get_function_configuration branch from 94c88a8 to a29238b Compare January 8, 2021 00:44
@enoodle enoodle requested a review from bblommers January 8, 2021 00:44
@coveralls
Copy link

coveralls commented Jan 8, 2021

Coverage Status

Coverage increased (+0.01%) to 94.57% when pulling bc92dee on enoodle:adding_lambda_get_function_configuration into bce682a on spulec:master.

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes @enoodle. Looks like the linter fails atm (https://travis-ci.org/github/spulec/moto/builds/753454806) - happy to merge once that's resolved.

@enoodle
Copy link
Contributor Author

enoodle commented Jan 10, 2021

@bblommers I fixed the linting issue.

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bblommers bblommers merged commit f749f58 into getmoto:master Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants