@@ -9,12 +9,17 @@ import type {
99import type { createAndPublishDownloadCenterConfig as createAndPublishDownloadCenterConfigFn } from './download-center' ;
1010import { GithubRepo } from '@mongodb-js/devtools-github-repo' ;
1111import type { publishToHomebrew as publishToHomebrewType } from './homebrew' ;
12+ import {
13+ type publishToNpm as publishToNpmType ,
14+ type pushTags as pushTagsType ,
15+ } from './npm-packages' ;
1216import type {
13- publishToNpm as publishToNpmType ,
14- pushTags as pushTagsType ,
17+ bumpMongoshReleasePackages as bumpMongoshReleasePackagesFn ,
18+ bumpAuxiliaryPackages as bumpAuxiliaryPackagesFn ,
1519} from './npm-packages' ;
1620import { publishMongosh } from './publish-mongosh' ;
1721import { dummyConfig } from '../test/helpers' ;
22+ import { getArtifactUrl } from './evergreen' ;
1823
1924chai . use ( require ( 'sinon-chai' ) ) ;
2025
@@ -36,11 +41,14 @@ describe('publishMongosh', function () {
3641 let writeBuildInfo : typeof writeBuildInfoType ;
3742 let publishToHomebrew : typeof publishToHomebrewType ;
3843 let shouldDoPublicRelease : typeof shouldDoPublicReleaseFn ;
44+ let bumpMongoshReleasePackages : typeof bumpMongoshReleasePackagesFn ;
45+ let bumpAuxiliaryPackages : typeof bumpAuxiliaryPackagesFn ;
3946 let githubRepo : GithubRepo ;
4047 let mongoHomebrewCoreForkRepo : GithubRepo ;
4148 let homebrewCoreRepo : GithubRepo ;
4249 let barque : Barque ;
4350 let pushTags : typeof pushTagsType ;
51+ const getEvergreenArtifactUrl = getArtifactUrl ;
4452
4553 beforeEach ( function ( ) {
4654 config = { ...dummyConfig } ;
@@ -51,6 +59,8 @@ describe('publishMongosh', function () {
5159 publishToHomebrew = sinon . spy ( ) ;
5260 shouldDoPublicRelease = sinon . spy ( ) ;
5361 pushTags = sinon . spy ( ) ;
62+ bumpMongoshReleasePackages = sinon . spy ( ) ;
63+ bumpAuxiliaryPackages = sinon . spy ( ) ;
5464
5565 githubRepo = createStubRepo ( ) ;
5666 mongoHomebrewCoreForkRepo = createStubRepo ( ) ;
@@ -95,7 +105,10 @@ describe('publishMongosh', function () {
95105 pushTags ,
96106 writeBuildInfo ,
97107 publishToHomebrew ,
98- shouldDoPublicRelease
108+ shouldDoPublicRelease ,
109+ getEvergreenArtifactUrl ,
110+ bumpMongoshReleasePackages ,
111+ bumpAuxiliaryPackages
99112 ) ;
100113 } catch ( e : any ) {
101114 return expect ( e . message ) . to . contain ( 'Could not find prior draft tag' ) ;
@@ -121,7 +134,10 @@ describe('publishMongosh', function () {
121134 pushTags ,
122135 writeBuildInfo ,
123136 publishToHomebrew ,
124- shouldDoPublicRelease
137+ shouldDoPublicRelease ,
138+ getEvergreenArtifactUrl ,
139+ bumpMongoshReleasePackages ,
140+ bumpAuxiliaryPackages
125141 ) ;
126142 } catch ( e : any ) {
127143 return expect ( e . message ) . to . contain ( 'Version mismatch' ) ;
@@ -142,7 +158,10 @@ describe('publishMongosh', function () {
142158 pushTags ,
143159 writeBuildInfo ,
144160 publishToHomebrew ,
145- shouldDoPublicRelease
161+ shouldDoPublicRelease ,
162+ getEvergreenArtifactUrl ,
163+ bumpMongoshReleasePackages ,
164+ bumpAuxiliaryPackages
146165 ) ;
147166
148167 expect ( barque . releaseToBarque ) . to . have . been . callCount ( 26 ) ;
@@ -173,7 +192,10 @@ describe('publishMongosh', function () {
173192 pushTags ,
174193 writeBuildInfo ,
175194 publishToHomebrew ,
176- shouldDoPublicRelease
195+ shouldDoPublicRelease ,
196+ getEvergreenArtifactUrl ,
197+ bumpMongoshReleasePackages ,
198+ bumpAuxiliaryPackages
177199 ) ;
178200
179201 expect ( createAndPublishDownloadCenterConfig ) . to . have . been . calledWith (
@@ -196,7 +218,10 @@ describe('publishMongosh', function () {
196218 pushTags ,
197219 writeBuildInfo ,
198220 publishToHomebrew ,
199- shouldDoPublicRelease
221+ shouldDoPublicRelease ,
222+ getEvergreenArtifactUrl ,
223+ bumpMongoshReleasePackages ,
224+ bumpAuxiliaryPackages
200225 ) ;
201226
202227 expect ( githubRepo . promoteRelease ) . to . have . been . calledWith ( config ) ;
@@ -214,7 +239,10 @@ describe('publishMongosh', function () {
214239 pushTags ,
215240 writeBuildInfo ,
216241 publishToHomebrew ,
217- shouldDoPublicRelease
242+ shouldDoPublicRelease ,
243+ getEvergreenArtifactUrl ,
244+ bumpMongoshReleasePackages ,
245+ bumpAuxiliaryPackages
218246 ) ;
219247
220248 expect ( writeBuildInfo ) . to . have . been . calledOnceWith ( config ) ;
@@ -233,7 +261,10 @@ describe('publishMongosh', function () {
233261 pushTags ,
234262 writeBuildInfo ,
235263 publishToHomebrew ,
236- shouldDoPublicRelease
264+ shouldDoPublicRelease ,
265+ getEvergreenArtifactUrl ,
266+ bumpMongoshReleasePackages ,
267+ bumpAuxiliaryPackages
237268 ) ;
238269
239270 expect ( publishToHomebrew ) . to . have . been . calledWith (
@@ -264,7 +295,10 @@ describe('publishMongosh', function () {
264295 pushTags ,
265296 writeBuildInfo ,
266297 publishToHomebrew ,
267- shouldDoPublicRelease
298+ shouldDoPublicRelease ,
299+ getEvergreenArtifactUrl ,
300+ bumpMongoshReleasePackages ,
301+ bumpAuxiliaryPackages
268302 ) ;
269303
270304 expect ( createAndPublishDownloadCenterConfig ) . not . to . have . been . called ;
@@ -282,7 +316,10 @@ describe('publishMongosh', function () {
282316 pushTags ,
283317 writeBuildInfo ,
284318 publishToHomebrew ,
285- shouldDoPublicRelease
319+ shouldDoPublicRelease ,
320+ getEvergreenArtifactUrl ,
321+ bumpMongoshReleasePackages ,
322+ bumpAuxiliaryPackages
286323 ) ;
287324
288325 expect ( githubRepo . promoteRelease ) . not . to . have . been . called ;
@@ -300,7 +337,10 @@ describe('publishMongosh', function () {
300337 pushTags ,
301338 writeBuildInfo ,
302339 publishToHomebrew ,
303- shouldDoPublicRelease
340+ shouldDoPublicRelease ,
341+ getEvergreenArtifactUrl ,
342+ bumpMongoshReleasePackages ,
343+ bumpAuxiliaryPackages
304344 ) ;
305345
306346 expect ( publishToNpm ) . not . to . have . been . called ;
@@ -318,7 +358,10 @@ describe('publishMongosh', function () {
318358 pushTags ,
319359 writeBuildInfo ,
320360 publishToHomebrew ,
321- shouldDoPublicRelease
361+ shouldDoPublicRelease ,
362+ getEvergreenArtifactUrl ,
363+ bumpMongoshReleasePackages ,
364+ bumpAuxiliaryPackages
322365 ) ;
323366
324367 expect ( publishToHomebrew ) . not . to . have . been . called ;
@@ -336,7 +379,10 @@ describe('publishMongosh', function () {
336379 pushTags ,
337380 writeBuildInfo ,
338381 publishToHomebrew ,
339- shouldDoPublicRelease
382+ shouldDoPublicRelease ,
383+ getEvergreenArtifactUrl ,
384+ bumpMongoshReleasePackages ,
385+ bumpAuxiliaryPackages
340386 ) ;
341387
342388 expect ( barque . releaseToBarque ) . not . to . have . been . called ;
0 commit comments