@@ -38,15 +38,15 @@ describe('auth tests', () => {
3838 process . env [ `INPUT_SETTINGS-PATH` ] = altHome ;
3939 await io . rmRF ( altHome ) ; // ensure it doesn't already exist
4040
41- await auth . configAuthentication ( id , username , password ) ;
41+ await auth . configAuthentication ( [ { id, username, password} ] ) ;
4242
4343 expect ( fs . existsSync ( m2Dir ) ) . toBe ( false ) ;
4444 expect ( fs . existsSync ( settingsFile ) ) . toBe ( false ) ;
4545
4646 expect ( fs . existsSync ( altHome ) ) . toBe ( true ) ;
4747 expect ( fs . existsSync ( altSettingsFile ) ) . toBe ( true ) ;
4848 expect ( fs . readFileSync ( altSettingsFile , 'utf-8' ) ) . toEqual (
49- auth . generate ( id , username , password )
49+ auth . generate ( [ { id, username, password} ] )
5050 ) ;
5151
5252 delete process . env [ `INPUT_SETTINGS-PATH` ] ;
@@ -58,12 +58,12 @@ describe('auth tests', () => {
5858 const username = 'UNAME' ;
5959 const password = 'TOKEN' ;
6060
61- await auth . configAuthentication ( id , username , password ) ;
61+ await auth . configAuthentication ( [ { id, username, password} ] ) ;
6262
6363 expect ( fs . existsSync ( m2Dir ) ) . toBe ( true ) ;
6464 expect ( fs . existsSync ( settingsFile ) ) . toBe ( true ) ;
6565 expect ( fs . readFileSync ( settingsFile , 'utf-8' ) ) . toEqual (
66- auth . generate ( id , username , password )
66+ auth . generate ( [ { id, username, password} ] )
6767 ) ;
6868 } , 100000 ) ;
6969
@@ -73,12 +73,12 @@ describe('auth tests', () => {
7373 const password = 'TOKEN' ;
7474 const gpgPassphrase = 'GPG' ;
7575
76- await auth . configAuthentication ( id , username , password , gpgPassphrase ) ;
76+ await auth . configAuthentication ( [ { id, username, password} ] , gpgPassphrase ) ;
7777
7878 expect ( fs . existsSync ( m2Dir ) ) . toBe ( true ) ;
7979 expect ( fs . existsSync ( settingsFile ) ) . toBe ( true ) ;
8080 expect ( fs . readFileSync ( settingsFile , 'utf-8' ) ) . toEqual (
81- auth . generate ( id , username , password , gpgPassphrase )
81+ auth . generate ( [ { id, username, password} ] , gpgPassphrase )
8282 ) ;
8383 } , 100000 ) ;
8484
@@ -92,12 +92,12 @@ describe('auth tests', () => {
9292 expect ( fs . existsSync ( m2Dir ) ) . toBe ( true ) ;
9393 expect ( fs . existsSync ( settingsFile ) ) . toBe ( true ) ;
9494
95- await auth . configAuthentication ( id , username , password ) ;
95+ await auth . configAuthentication ( [ { id, username, password} ] ) ;
9696
9797 expect ( fs . existsSync ( m2Dir ) ) . toBe ( true ) ;
9898 expect ( fs . existsSync ( settingsFile ) ) . toBe ( true ) ;
9999 expect ( fs . readFileSync ( settingsFile , 'utf-8' ) ) . toEqual (
100- auth . generate ( id , username , password )
100+ auth . generate ( [ { id, username, password} ] )
101101 ) ;
102102 } , 100000 ) ;
103103
@@ -118,7 +118,7 @@ describe('auth tests', () => {
118118 </servers>
119119</settings>` ;
120120
121- expect ( auth . generate ( id , username , password ) ) . toEqual ( expectedSettings ) ;
121+ expect ( auth . generate ( [ { id, username, password} ] ) ) . toEqual ( expectedSettings ) ;
122122 } ) ;
123123
124124 it ( 'generates valid settings.xml with additional configuration' , ( ) => {
@@ -143,7 +143,7 @@ describe('auth tests', () => {
143143 </servers>
144144</settings>` ;
145145
146- expect ( auth . generate ( id , username , password , gpgPassphrase ) ) . toEqual (
146+ expect ( auth . generate ( [ { id, username, password} ] , gpgPassphrase ) ) . toEqual (
147147 expectedSettings
148148 ) ;
149149 } ) ;
0 commit comments