@@ -59,12 +59,14 @@ test("ImageFromAwsEcr", async () => {
5959 } ) ;
6060 expect ( app . appId ) . toBeTruthy ( ) ;
6161
62- const image = await app . imageFromAwsEcr (
63- "459781239556.dkr.ecr.us-east-1.amazonaws.com/ecr-private-registry-test-7522615:python" ,
64- await tc . secrets . fromName ( "libmodal-aws-ecr-test" , {
65- requiredKeys : [ "AWS_ACCESS_KEY_ID" , "AWS_SECRET_ACCESS_KEY" ] ,
66- } ) ,
67- ) ;
62+ const image = await tc . images
63+ . fromAwsEcr (
64+ "459781239556.dkr.ecr.us-east-1.amazonaws.com/ecr-private-registry-test-7522615:python" ,
65+ await tc . secrets . fromName ( "libmodal-aws-ecr-test" , {
66+ requiredKeys : [ "AWS_ACCESS_KEY_ID" , "AWS_SECRET_ACCESS_KEY" ] ,
67+ } ) ,
68+ )
69+ . build ( app ) ;
6870 expect ( image . imageId ) . toBeTruthy ( ) ;
6971 expect ( image . imageId ) . toMatch ( / ^ i m - / ) ;
7072} ) ;
@@ -75,12 +77,14 @@ test("ImageFromGcpArtifactRegistry", { timeout: 30_000 }, async () => {
7577 } ) ;
7678 expect ( app . appId ) . toBeTruthy ( ) ;
7779
78- const image = await app . imageFromGcpArtifactRegistry (
79- "us-east1-docker.pkg.dev/modal-prod-367916/private-repo-test/my-image" ,
80- await tc . secrets . fromName ( "libmodal-gcp-artifact-registry-test" , {
81- requiredKeys : [ "SERVICE_ACCOUNT_JSON" ] ,
82- } ) ,
83- ) ;
80+ const image = await tc . images
81+ . fromGcpArtifactRegistry (
82+ "us-east1-docker.pkg.dev/modal-prod-367916/private-repo-test/my-image" ,
83+ await tc . secrets . fromName ( "libmodal-gcp-artifact-registry-test" , {
84+ requiredKeys : [ "SERVICE_ACCOUNT_JSON" ] ,
85+ } ) ,
86+ )
87+ . build ( app ) ;
8488 expect ( image . imageId ) . toBeTruthy ( ) ;
8589 expect ( image . imageId ) . toMatch ( / ^ i m - / ) ;
8690} ) ;
@@ -107,7 +111,7 @@ test("CreateOneSandboxTopLevelImageAPISecret", async () => {
107111 } ) ;
108112 expect ( app . appId ) . toBeTruthy ( ) ;
109113
110- const image = await tc . images . fromRegistry (
114+ const image = tc . images . fromRegistry (
111115 "us-east1-docker.pkg.dev/modal-prod-367916/private-repo-test/my-image" ,
112116 await tc . secrets . fromName ( "libmodal-gcp-artifact-registry-test" , {
113117 requiredKeys : [ "REGISTRY_USERNAME" , "REGISTRY_PASSWORD" ] ,
@@ -128,7 +132,7 @@ test("ImageFromAwsEcrTopLevel", async () => {
128132 } ) ;
129133 expect ( app . appId ) . toBeTruthy ( ) ;
130134
131- const image = await tc . images . fromAwsEcr (
135+ const image = tc . images . fromAwsEcr (
132136 "459781239556.dkr.ecr.us-east-1.amazonaws.com/ecr-private-registry-test-7522615:python" ,
133137 await tc . secrets . fromName ( "libmodal-aws-ecr-test" , {
134138 requiredKeys : [ "AWS_ACCESS_KEY_ID" , "AWS_SECRET_ACCESS_KEY" ] ,
@@ -149,7 +153,7 @@ test("ImageFromGcpEcrTopLevel", async () => {
149153 } ) ;
150154 expect ( app . appId ) . toBeTruthy ( ) ;
151155
152- const image = await tc . images . fromGcpArtifactRegistry (
156+ const image = tc . images . fromGcpArtifactRegistry (
153157 "us-east1-docker.pkg.dev/modal-prod-367916/private-repo-test/my-image" ,
154158 await tc . secrets . fromName ( "libmodal-gcp-artifact-registry-test" , {
155159 requiredKeys : [ "SERVICE_ACCOUNT_JSON" ] ,
0 commit comments