@@ -91,9 +91,9 @@ describe('authutil tests', () => {
91
91
process . env [ 'NUGET_AUTH_TOKEN' ] = '' ;
92
92
} ) ;
93
93
94
- it ( 'No existing config, sets up a full NuGet.config with URL and user/PAT for GPR' , async ( ) => {
94
+ it ( 'no existing config, sets up a full NuGet.config with URL and user/PAT for GPR' , async ( ) => {
95
95
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
96
- await auth . configAuthentication (
96
+ auth . configAuthentication (
97
97
'https://nuget.pkg.github.com/OwnerName/index.json' ,
98
98
'' ,
99
99
fakeSourcesDirForTesting
@@ -104,10 +104,10 @@ describe('authutil tests', () => {
104
104
) . toMatchSnapshot ( ) ;
105
105
} ) ;
106
106
107
- it ( 'No existing config, auth token environment variable not provided, throws' , async ( ) => {
107
+ it ( 'no existing config, auth token environment variable not provided, throws' , async ( ) => {
108
108
let thrown = false ;
109
109
try {
110
- await auth . configAuthentication (
110
+ auth . configAuthentication (
111
111
'https://nuget.pkg.github.com/OwnerName/index.json' ,
112
112
'' ,
113
113
fakeSourcesDirForTesting
@@ -118,10 +118,10 @@ describe('authutil tests', () => {
118
118
expect ( thrown ) . toBe ( true ) ;
119
119
} ) ;
120
120
121
- it ( 'No existing config, sets up a full NuGet.config with URL and other owner/PAT for GPR' , async ( ) => {
121
+ it ( 'no existing config, sets up a full NuGet.config with URL and other owner/PAT for GPR' , async ( ) => {
122
122
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
123
123
process . env [ 'INPUT_OWNER' ] = 'otherorg' ;
124
- await auth . configAuthentication (
124
+ auth . configAuthentication (
125
125
'https://nuget.pkg.github.com/otherorg/index.json' ,
126
126
'' ,
127
127
fakeSourcesDirForTesting
@@ -132,7 +132,7 @@ describe('authutil tests', () => {
132
132
) . toMatchSnapshot ( ) ;
133
133
} ) ;
134
134
135
- it ( 'Existing config (invalid), tries to parse an invalid NuGet.config and throws' , async ( ) => {
135
+ it ( 'existing config (invalid), tries to parse an invalid NuGet.config and throws' , async ( ) => {
136
136
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
137
137
const inputNuGetConfigPath : string = path . join (
138
138
fakeSourcesDirForTesting ,
@@ -141,7 +141,7 @@ describe('authutil tests', () => {
141
141
fs . writeFileSync ( inputNuGetConfigPath , invalidNuGetConfig ) ;
142
142
let thrown = false ;
143
143
try {
144
- await auth . configAuthentication (
144
+ auth . configAuthentication (
145
145
'https://nuget.pkg.github.com/OwnerName/index.json' ,
146
146
'' ,
147
147
fakeSourcesDirForTesting
@@ -152,14 +152,14 @@ describe('authutil tests', () => {
152
152
expect ( thrown ) . toBe ( true ) ;
153
153
} ) ;
154
154
155
- it ( 'Existing config w/ no sources, sets up a full NuGet.config with URL and user/PAT for GPR' , async ( ) => {
155
+ it ( 'existing config w/ no sources, sets up a full NuGet.config with URL and user/PAT for GPR' , async ( ) => {
156
156
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
157
157
const inputNuGetConfigPath : string = path . join (
158
158
fakeSourcesDirForTesting ,
159
159
'nuget.config'
160
160
) ;
161
161
fs . writeFileSync ( inputNuGetConfigPath , emptyNuGetConfig ) ;
162
- await auth . configAuthentication (
162
+ auth . configAuthentication (
163
163
'https://nuget.pkg.github.com/OwnerName/index.json' ,
164
164
'' ,
165
165
fakeSourcesDirForTesting
@@ -170,14 +170,14 @@ describe('authutil tests', () => {
170
170
) . toMatchSnapshot ( ) ;
171
171
} ) ;
172
172
173
- it ( 'Existing config w/ no GPR sources, sets up a full NuGet.config with URL and user/PAT for GPR' , async ( ) => {
173
+ it ( 'existing config w/ no GPR sources, sets up a full NuGet.config with URL and user/PAT for GPR' , async ( ) => {
174
174
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
175
175
const inputNuGetConfigPath : string = path . join (
176
176
fakeSourcesDirForTesting ,
177
177
'nuget.config'
178
178
) ;
179
179
fs . writeFileSync ( inputNuGetConfigPath , nugetorgNuGetConfig ) ;
180
- await auth . configAuthentication (
180
+ auth . configAuthentication (
181
181
'https://nuget.pkg.github.com/OwnerName/index.json' ,
182
182
'' ,
183
183
fakeSourcesDirForTesting
@@ -188,14 +188,14 @@ describe('authutil tests', () => {
188
188
) . toMatchSnapshot ( ) ;
189
189
} ) ;
190
190
191
- it ( 'Existing config w/ only GPR source, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
191
+ it ( 'existing config w/ only GPR source, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
192
192
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
193
193
const inputNuGetConfigPath : string = path . join (
194
194
fakeSourcesDirForTesting ,
195
195
'nuget.config'
196
196
) ;
197
197
fs . writeFileSync ( inputNuGetConfigPath , gprNuGetConfig ) ;
198
- await auth . configAuthentication (
198
+ auth . configAuthentication (
199
199
'https://nuget.pkg.github.com/OwnerName/index.json' ,
200
200
'' ,
201
201
fakeSourcesDirForTesting
@@ -206,14 +206,14 @@ describe('authutil tests', () => {
206
206
) . toMatchSnapshot ( ) ;
207
207
} ) ;
208
208
209
- it ( 'Existing config w/ GPR source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
209
+ it ( 'existing config w/ GPR source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
210
210
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
211
211
const inputNuGetConfigPath : string = path . join (
212
212
fakeSourcesDirForTesting ,
213
213
'nuget.config'
214
214
) ;
215
215
fs . writeFileSync ( inputNuGetConfigPath , gprnugetorgNuGetConfig ) ;
216
- await auth . configAuthentication (
216
+ auth . configAuthentication (
217
217
'https://nuget.pkg.github.com/OwnerName/index.json' ,
218
218
'' ,
219
219
fakeSourcesDirForTesting
@@ -224,14 +224,14 @@ describe('authutil tests', () => {
224
224
) . toMatchSnapshot ( ) ;
225
225
} ) ;
226
226
227
- it ( 'Existing config w/ two GPR sources, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
227
+ it ( 'existing config w/ two GPR sources, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
228
228
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
229
229
const inputNuGetConfigPath : string = path . join (
230
230
fakeSourcesDirForTesting ,
231
231
'nuget.config'
232
232
) ;
233
233
fs . writeFileSync ( inputNuGetConfigPath , twogprNuGetConfig ) ;
234
- await auth . configAuthentication (
234
+ auth . configAuthentication (
235
235
'https://nuget.pkg.github.com' ,
236
236
'' ,
237
237
fakeSourcesDirForTesting
@@ -242,7 +242,7 @@ describe('authutil tests', () => {
242
242
) . toMatchSnapshot ( ) ;
243
243
} ) ;
244
244
245
- it ( 'Existing config w/ spaces in key, throws for now' , async ( ) => {
245
+ it ( 'existing config w/ spaces in key, throws for now' , async ( ) => {
246
246
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
247
247
const inputNuGetConfigPath : string = path . join (
248
248
fakeSourcesDirForTesting ,
@@ -251,7 +251,7 @@ describe('authutil tests', () => {
251
251
fs . writeFileSync ( inputNuGetConfigPath , spaceNuGetConfig ) ;
252
252
let thrown = false ;
253
253
try {
254
- await auth . configAuthentication (
254
+ auth . configAuthentication (
255
255
'https://nuget.pkg.github.com/OwnerName/index.json' ,
256
256
'' ,
257
257
fakeSourcesDirForTesting
@@ -262,7 +262,7 @@ describe('authutil tests', () => {
262
262
expect ( thrown ) . toBe ( true ) ;
263
263
} ) ;
264
264
265
- it ( 'Existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
265
+ it ( 'existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
266
266
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
267
267
const inputNuGetConfigDirectory : string = path . join (
268
268
fakeSourcesDirForTesting ,
@@ -274,7 +274,7 @@ describe('authutil tests', () => {
274
274
) ;
275
275
fs . mkdirSync ( inputNuGetConfigDirectory , { recursive : true } ) ;
276
276
fs . writeFileSync ( inputNuGetConfigPath , gprNuGetConfig ) ;
277
- await auth . configAuthentication (
277
+ auth . configAuthentication (
278
278
'https://nuget.pkg.github.com/OwnerName/index.json' ,
279
279
'subfolder/nuget.config' ,
280
280
fakeSourcesDirForTesting
@@ -285,14 +285,14 @@ describe('authutil tests', () => {
285
285
) . toMatchSnapshot ( ) ;
286
286
} ) ;
287
287
288
- it ( 'Existing config w/ only Azure Artifacts source, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
288
+ it ( 'existing config w/ only Azure Artifacts source, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
289
289
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
290
290
const inputNuGetConfigPath : string = path . join (
291
291
fakeSourcesDirForTesting ,
292
292
'nuget.config'
293
293
) ;
294
294
fs . writeFileSync ( inputNuGetConfigPath , azureartifactsNuGetConfig ) ;
295
- await auth . configAuthentication (
295
+ auth . configAuthentication (
296
296
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json' ,
297
297
'' ,
298
298
fakeSourcesDirForTesting
@@ -303,14 +303,14 @@ describe('authutil tests', () => {
303
303
) . toMatchSnapshot ( ) ;
304
304
} ) ;
305
305
306
- it ( 'Existing config w/ Azure Artifacts source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
306
+ it ( 'existing config w/ Azure Artifacts source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR' , async ( ) => {
307
307
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
308
308
const inputNuGetConfigPath : string = path . join (
309
309
fakeSourcesDirForTesting ,
310
310
'nuget.config'
311
311
) ;
312
312
fs . writeFileSync ( inputNuGetConfigPath , azureartifactsnugetorgNuGetConfig ) ;
313
- await auth . configAuthentication (
313
+ auth . configAuthentication (
314
314
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json' ,
315
315
'' ,
316
316
fakeSourcesDirForTesting
@@ -321,9 +321,9 @@ describe('authutil tests', () => {
321
321
) . toMatchSnapshot ( ) ;
322
322
} ) ;
323
323
324
- it ( 'No existing config, sets up a full NuGet.config with URL and token for other source' , async ( ) => {
324
+ it ( 'no existing config, sets up a full NuGet.config with URL and token for other source' , async ( ) => {
325
325
process . env [ 'NUGET_AUTH_TOKEN' ] = 'TEST_FAKE_AUTH_TOKEN' ;
326
- await auth . configAuthentication (
326
+ auth . configAuthentication (
327
327
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json' ,
328
328
'' ,
329
329
fakeSourcesDirForTesting
0 commit comments