@@ -49,6 +49,7 @@ describe('publishMongosh', function () {
49
49
let barque : Barque ;
50
50
let pushTags : typeof pushTagsType ;
51
51
const getEvergreenArtifactUrl = getArtifactUrl ;
52
+ let spawnSync : sinon . SinonStub ;
52
53
53
54
beforeEach ( function ( ) {
54
55
config = { ...dummyConfig } ;
@@ -61,6 +62,7 @@ describe('publishMongosh', function () {
61
62
pushTags = sinon . spy ( ) ;
62
63
bumpMongoshReleasePackages = sinon . spy ( ) ;
63
64
bumpAuxiliaryPackages = sinon . spy ( ) ;
65
+ spawnSync = sinon . stub ( ) . resolves ( ) ;
64
66
65
67
githubRepo = createStubRepo ( ) ;
66
68
mongoHomebrewCoreForkRepo = createStubRepo ( ) ;
@@ -108,7 +110,8 @@ describe('publishMongosh', function () {
108
110
shouldDoPublicRelease ,
109
111
getEvergreenArtifactUrl ,
110
112
bumpMongoshReleasePackages ,
111
- bumpAuxiliaryPackages
113
+ bumpAuxiliaryPackages ,
114
+ spawnSync
112
115
) ;
113
116
} catch ( e : any ) {
114
117
return expect ( e . message ) . to . contain ( 'Could not find prior draft tag' ) ;
@@ -137,7 +140,8 @@ describe('publishMongosh', function () {
137
140
shouldDoPublicRelease ,
138
141
getEvergreenArtifactUrl ,
139
142
bumpMongoshReleasePackages ,
140
- bumpAuxiliaryPackages
143
+ bumpAuxiliaryPackages ,
144
+ spawnSync
141
145
) ;
142
146
} catch ( e : any ) {
143
147
return expect ( e . message ) . to . contain ( 'Version mismatch' ) ;
@@ -161,7 +165,8 @@ describe('publishMongosh', function () {
161
165
shouldDoPublicRelease ,
162
166
getEvergreenArtifactUrl ,
163
167
bumpMongoshReleasePackages ,
164
- bumpAuxiliaryPackages
168
+ bumpAuxiliaryPackages ,
169
+ spawnSync
165
170
) ;
166
171
167
172
expect ( barque . releaseToBarque ) . to . have . been . callCount ( 26 ) ;
@@ -195,7 +200,8 @@ describe('publishMongosh', function () {
195
200
shouldDoPublicRelease ,
196
201
getEvergreenArtifactUrl ,
197
202
bumpMongoshReleasePackages ,
198
- bumpAuxiliaryPackages
203
+ bumpAuxiliaryPackages ,
204
+ spawnSync
199
205
) ;
200
206
201
207
expect ( createAndPublishDownloadCenterConfig ) . to . have . been . calledWith (
@@ -221,7 +227,8 @@ describe('publishMongosh', function () {
221
227
shouldDoPublicRelease ,
222
228
getEvergreenArtifactUrl ,
223
229
bumpMongoshReleasePackages ,
224
- bumpAuxiliaryPackages
230
+ bumpAuxiliaryPackages ,
231
+ spawnSync
225
232
) ;
226
233
227
234
expect ( githubRepo . promoteRelease ) . to . have . been . calledWith ( config ) ;
@@ -242,7 +249,8 @@ describe('publishMongosh', function () {
242
249
shouldDoPublicRelease ,
243
250
getEvergreenArtifactUrl ,
244
251
bumpMongoshReleasePackages ,
245
- bumpAuxiliaryPackages
252
+ bumpAuxiliaryPackages ,
253
+ spawnSync
246
254
) ;
247
255
248
256
expect ( writeBuildInfo ) . to . have . been . calledOnceWith ( config ) ;
@@ -264,7 +272,8 @@ describe('publishMongosh', function () {
264
272
shouldDoPublicRelease ,
265
273
getEvergreenArtifactUrl ,
266
274
bumpMongoshReleasePackages ,
267
- bumpAuxiliaryPackages
275
+ bumpAuxiliaryPackages ,
276
+ spawnSync
268
277
) ;
269
278
270
279
expect ( publishToHomebrew ) . to . have . been . calledWith (
@@ -298,7 +307,8 @@ describe('publishMongosh', function () {
298
307
shouldDoPublicRelease ,
299
308
getEvergreenArtifactUrl ,
300
309
bumpMongoshReleasePackages ,
301
- bumpAuxiliaryPackages
310
+ bumpAuxiliaryPackages ,
311
+ spawnSync
302
312
) ;
303
313
304
314
expect ( createAndPublishDownloadCenterConfig ) . not . to . have . been . called ;
@@ -319,7 +329,8 @@ describe('publishMongosh', function () {
319
329
shouldDoPublicRelease ,
320
330
getEvergreenArtifactUrl ,
321
331
bumpMongoshReleasePackages ,
322
- bumpAuxiliaryPackages
332
+ bumpAuxiliaryPackages ,
333
+ spawnSync
323
334
) ;
324
335
325
336
expect ( githubRepo . promoteRelease ) . not . to . have . been . called ;
@@ -340,7 +351,8 @@ describe('publishMongosh', function () {
340
351
shouldDoPublicRelease ,
341
352
getEvergreenArtifactUrl ,
342
353
bumpMongoshReleasePackages ,
343
- bumpAuxiliaryPackages
354
+ bumpAuxiliaryPackages ,
355
+ spawnSync
344
356
) ;
345
357
346
358
expect ( publishToNpm ) . not . to . have . been . called ;
@@ -361,7 +373,8 @@ describe('publishMongosh', function () {
361
373
shouldDoPublicRelease ,
362
374
getEvergreenArtifactUrl ,
363
375
bumpMongoshReleasePackages ,
364
- bumpAuxiliaryPackages
376
+ bumpAuxiliaryPackages ,
377
+ spawnSync
365
378
) ;
366
379
367
380
expect ( publishToHomebrew ) . not . to . have . been . called ;
@@ -382,7 +395,8 @@ describe('publishMongosh', function () {
382
395
shouldDoPublicRelease ,
383
396
getEvergreenArtifactUrl ,
384
397
bumpMongoshReleasePackages ,
385
- bumpAuxiliaryPackages
398
+ bumpAuxiliaryPackages ,
399
+ spawnSync
386
400
) ;
387
401
388
402
expect ( barque . releaseToBarque ) . not . to . have . been . called ;
0 commit comments