@@ -235,15 +235,18 @@ describe("dialogs", () => {
235
235
dialogs . selectBackendServiceAccounts ( "number" , "id" , { } ) ,
236
236
) . to . eventually . deep . equal ( secrets . toMulti ( accounts ) ) ;
237
237
238
+ expect ( utils . logLabeledBullet ) . to . have . been . calledWith (
239
+ "apphosting" ,
240
+ "To use this secret, your backend's service account must have secret accessor permission. " +
241
+ `All of your backends use service accounts ${ dialogs . serviceAccountDisplay ( accounts ) } . ` +
242
+ "Granting access to one backend will grant access to all backends." ,
243
+ ) ;
238
244
expect ( prompt . confirm ) . to . have . been . calledWith ( {
239
245
nonInteractive : undefined ,
240
246
default : true ,
241
- message :
242
- "To use this secret, your backend's service account must have secret accessor permission. " +
243
- `All of your backends use service accounts ${ dialogs . serviceAccountDisplay ( accounts ) } . ` +
244
- "Granting access to one backend will grant access to all backends. Would you like to grant it now?" ,
247
+ message : "Would you like to grant it now?" ,
245
248
} ) ;
246
- expect ( utils . logLabeledBullet ) . to . not . have . been . called ;
249
+ expect ( utils . logLabeledBullet ) . to . have . been . calledOnce ;
247
250
} ) ;
248
251
249
252
it ( "handles multiple backends with the same (multiple) SAs (opt no)" , async ( ) => {
@@ -258,13 +261,16 @@ describe("dialogs", () => {
258
261
dialogs . selectBackendServiceAccounts ( "number" , "id" , { } ) ,
259
262
) . to . eventually . deep . equal ( emptyMulti ) ;
260
263
264
+ expect ( utils . logLabeledBullet ) . to . have . been . calledWith (
265
+ "apphosting" ,
266
+ "To use this secret, your backend's service account must have secret accessor permission. " +
267
+ `All of your backends use service accounts ${ dialogs . serviceAccountDisplay ( legacyAccounts ) } . ` +
268
+ "Granting access to one backend will grant access to all backends." ,
269
+ ) ;
261
270
expect ( prompt . confirm ) . to . have . been . calledWith ( {
262
271
nonInteractive : undefined ,
263
272
default : true ,
264
- message :
265
- "To use this secret, your backend's service account must have secret accessor permission. " +
266
- `All of your backends use service accounts ${ dialogs . serviceAccountDisplay ( legacyAccounts ) } . ` +
267
- "Granting access to one backend will grant access to all backends. Would you like to grant it now?" ,
273
+ message : "Would you like to grant it now?" ,
268
274
} ) ;
269
275
expect ( utils . logLabeledBullet ) . to . have . been . calledWith (
270
276
"apphosting" ,
@@ -286,15 +292,18 @@ describe("dialogs", () => {
286
292
runServiceAccounts : [ ] ,
287
293
} ) ;
288
294
295
+ expect ( utils . logLabeledBullet ) . to . have . been . calledWith (
296
+ "apphosting" ,
297
+ "To use this secret, your backend's service account must have secret accessor permission. " +
298
+ "All of your backends use service account a. Granting access to one backend will grant access " +
299
+ "to all backends." ,
300
+ ) ;
289
301
expect ( prompt . confirm ) . to . have . been . calledWith ( {
290
302
nonInteractive : undefined ,
291
303
default : true ,
292
- message :
293
- "To use this secret, your backend's service account must have secret accessor permission. " +
294
- "All of your backends use service account a. Granting access to one backend will grant access " +
295
- "to all backends. Would you like to grant it now?" ,
304
+ message : "Would you like to grant it now?" ,
296
305
} ) ;
297
- expect ( utils . logLabeledBullet ) . to . not . have . been . called ;
306
+ expect ( utils . logLabeledBullet ) . to . have . been . calledOnce ;
298
307
} ) ;
299
308
300
309
it ( "handles multiple backends with the same (single) SA (opt no)" , async ( ) => {
@@ -308,13 +317,16 @@ describe("dialogs", () => {
308
317
dialogs . selectBackendServiceAccounts ( "number" , "id" , { } ) ,
309
318
) . to . eventually . deep . equal ( emptyMulti ) ;
310
319
320
+ expect ( utils . logLabeledBullet ) . to . have . been . calledWith (
321
+ "apphosting" ,
322
+ "To use this secret, your backend's service account must have secret accessor permission. " +
323
+ "All of your backends use service account a. Granting access to one backend will grant access " +
324
+ "to all backends." ,
325
+ ) ;
311
326
expect ( prompt . confirm ) . to . have . been . calledWith ( {
312
327
nonInteractive : undefined ,
313
328
default : true ,
314
- message :
315
- "To use this secret, your backend's service account must have secret accessor permission. " +
316
- "All of your backends use service account a. Granting access to one backend will grant access " +
317
- "to all backends. Would you like to grant it now?" ,
329
+ message : "Would you like to grant it now?" ,
318
330
} ) ;
319
331
expect ( utils . logLabeledBullet ) . to . have . been . calledWith (
320
332
"apphosting" ,
0 commit comments