@@ -34,14 +34,17 @@ test('successful with username and password', async () => {
3434 const password : string = 'groundcontrol' ;
3535 process . env [ `INPUT_PASSWORD` ] = password ;
3636
37+ const ecr : string = 'auto' ;
38+ process . env [ 'INPUT_ECR' ] = ecr ;
39+
3740 const logout : boolean = false ;
3841 process . env [ 'INPUT_LOGOUT' ] = String ( logout ) ;
3942
4043 await run ( ) ;
4144
4245 expect ( setRegistrySpy ) . toHaveBeenCalledWith ( '' ) ;
4346 expect ( setLogoutSpy ) . toHaveBeenCalledWith ( logout ) ;
44- expect ( dockerSpy ) . toHaveBeenCalledWith ( '' , username , password ) ;
47+ expect ( dockerSpy ) . toHaveBeenCalledWith ( '' , username , password , ecr ) ;
4548} ) ;
4649
4750test ( 'calls docker login' , async ( ) => {
@@ -62,12 +65,15 @@ test('calls docker login', async () => {
6265 const registry : string = 'ghcr.io' ;
6366 process . env [ `INPUT_REGISTRY` ] = registry ;
6467
68+ const ecr : string = 'auto' ;
69+ process . env [ 'INPUT_ECR' ] = ecr ;
70+
6571 const logout : boolean = true ;
6672 process . env [ 'INPUT_LOGOUT' ] = String ( logout ) ;
6773
6874 await run ( ) ;
6975
7076 expect ( setRegistrySpy ) . toHaveBeenCalledWith ( registry ) ;
7177 expect ( setLogoutSpy ) . toHaveBeenCalledWith ( logout ) ;
72- expect ( dockerSpy ) . toHaveBeenCalledWith ( registry , username , password ) ;
78+ expect ( dockerSpy ) . toHaveBeenCalledWith ( registry , username , password , ecr ) ;
7379} ) ;
0 commit comments