Skip to content

Commit

Permalink
fix(integ): Use images that are in public ecr (#3162)
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Fuss <[email protected]>
  • Loading branch information
jfuss and jfuss authored Aug 11, 2021
1 parent af08766 commit 7f5de6b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 19 deletions.
6 changes: 1 addition & 5 deletions tests/integration/deploy/test_deploy_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ class TestDeploy(PackageIntegBase, DeployIntegBase):
def setUpClass(cls):
cls.docker_client = docker.from_env()
cls.local_images = [
("alpine", "latest"),
# below 3 images are for test_deploy_nested_stacks()
("python", "3.9-slim"),
("python", "3.8-slim"),
("python", "3.7-slim"),
("public.ecr.aws/sam/emulation-python3.8", "latest"),
]
# setup some images locally by pulling them.
for repo, tag in cls.local_images:
Expand Down
10 changes: 2 additions & 8 deletions tests/integration/package/test_package_command_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ class TestPackageImage(PackageIntegBase):
def setUpClass(cls):
cls.docker_client = docker.from_env()
cls.local_images = [
("alpine", "latest"),
# below 3 images are for test_package_with_deep_nested_template_image()
("python", "3.9-slim"),
("python", "3.8-slim"),
("python", "3.7-slim"),
("public.ecr.aws/sam/emulation-python3.8", "latest"),
]
# setup some images locally by pulling them.
for repo, tag in cls.local_images:
Expand Down Expand Up @@ -211,9 +207,7 @@ def test_package_with_deep_nested_template_image(self):

# verify all function images are pushed
images = [
("python", "3.9-slim"),
("python", "3.8-slim"),
("python", "3.7-slim"),
("public.ecr.aws/sam/emulation-python3.8", "latest"),
]
for image, tag in images:
# check string like this:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Resources:
Type: AWS::Lambda::Function
Properties:
PackageType: Image
Code: alpine:latest
Code: public.ecr.aws/sam/emulation-python3.8:latest
Role:
Fn::GetAtt:
- "LambdaExecutionRole"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Resources:
Type: AWS::Lambda::Function
Properties:
PackageType: Image
Code: alpine:latest
Code: public.ecr.aws/sam/emulation-python3.8:latest
Role:
Fn::GetAtt:
- "LambdaExecutionRole"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Resources:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
ImageUri: alpine:latest
ImageUri: public.ecr.aws/sam/emulation-python3.8:latest
Events:
HelloWorld:
Type: Api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Resources:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
ImageUri: python:3.9-slim
ImageUri: public.ecr.aws/sam/emulation-python3.8:latest
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Resources:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
ImageUri: python:3.7-slim
ImageUri: public.ecr.aws/sam/emulation-python3.8:latest

ChildStackY:
Type: AWS::Serverless::Application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Resources:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
ImageUri: python:3.8-slim
ImageUri: public.ecr.aws/sam/emulation-python3.8:latest

ChildStackX:
Type: AWS::Serverless::Application
Expand Down

0 comments on commit 7f5de6b

Please sign in to comment.