Skip to content

Commit

Permalink
handing case when update_status is "Pending"
Browse files Browse the repository at this point in the history
  • Loading branch information
DinisCruz committed Oct 14, 2024
1 parent 456af12 commit fc8f6e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ runs:
using: "composite"
steps:
- name: Start Local Stack
#uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/docker__local-stack@dev
uses: ./.github/actions/docker__local-stack
uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/docker__local-stack@dev
#uses: ./.github/actions/docker__local-stack
with:
LOCAL_STACK_SERVICES: 's3,lambda,iam,cloudwatch,dynamodb,logs,sts'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ def test_create__temp_lambda(self):
# # pprint(f"got result: {result}")
# # package_update_result = deploy_lambda.package.update()
# # pprint(package_update_result)

assert deploy_lambda.update() == 'Successful'
update_status = deploy_lambda.update()
if update_status == "Pending":
print("*********************************************")
print("Waiting for update to complete")
update_status = deploy_lambda.lambda_function().wait_for_function_update_to_complete(wait_time=0.5)
print("*********************************************")
pprint("update_status", update_status)
assert update_status == 'Successful'

with Lambda() as _:
assert 'osbot_local_stack_aws_lambdas_dev_hello_world' in _.functions_names()
Expand Down

0 comments on commit fc8f6e6

Please sign in to comment.