@@ -637,6 +637,109 @@ describe('MongoBinaryDownloadUrl', () => {
637637 } ) ;
638638 } ) ;
639639
640+ // for arch and arch based systems (no specific extra mapping)
641+ describe ( 'for arch' , ( ) => {
642+ it ( 'for arch for 4.4.2' , async ( ) => {
643+ jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
644+
645+ const du = new MongoBinaryDownloadUrl ( {
646+ platform : 'linux' ,
647+ arch : 'x64' ,
648+ version : '4.4.2' ,
649+ os : {
650+ os : 'linux' ,
651+ dist : 'Arch' ,
652+ release : 'rolling' ,
653+ id_like : [ 'arch' ] ,
654+ } ,
655+ } ) ;
656+ expect ( await du . getDownloadUrl ( ) ) . toBe (
657+ 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.2.tgz'
658+ ) ;
659+ expect ( console . warn ) . toHaveBeenCalledTimes ( 1 ) ;
660+ } ) ;
661+
662+ it ( 'for arch for 5.0.0' , async ( ) => {
663+ jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
664+
665+ const du = new MongoBinaryDownloadUrl ( {
666+ platform : 'linux' ,
667+ arch : 'x64' ,
668+ version : '5.0.0' ,
669+ os : {
670+ os : 'linux' ,
671+ dist : 'Arch' ,
672+ release : 'rolling' ,
673+ id_like : [ 'arch' ] ,
674+ } ,
675+ } ) ;
676+ expect ( await du . getDownloadUrl ( ) ) . toBe (
677+ 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-5.0.0.tgz'
678+ ) ;
679+ expect ( console . warn ) . toHaveBeenCalledTimes ( 1 ) ;
680+ } ) ;
681+
682+ it ( 'for arch for 6.0.4' , async ( ) => {
683+ jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
684+
685+ const du = new MongoBinaryDownloadUrl ( {
686+ platform : 'linux' ,
687+ arch : 'x64' ,
688+ version : '6.0.4' ,
689+ os : {
690+ os : 'linux' ,
691+ dist : 'Arch' ,
692+ release : 'rolling' ,
693+ id_like : [ 'arch' ] ,
694+ } ,
695+ } ) ;
696+ expect ( await du . getDownloadUrl ( ) ) . toBe (
697+ 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.4.tgz'
698+ ) ;
699+ expect ( console . warn ) . toHaveBeenCalledTimes ( 1 ) ;
700+ } ) ;
701+
702+ it ( 'for manjaro for 4.4.2' , async ( ) => {
703+ jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
704+
705+ const du = new MongoBinaryDownloadUrl ( {
706+ platform : 'linux' ,
707+ arch : 'x64' ,
708+ version : '4.4.2' ,
709+ os : {
710+ os : 'linux' ,
711+ dist : 'ManjaroLinux' ,
712+ release : '20.2' ,
713+ id_like : [ 'arch' ] ,
714+ } ,
715+ } ) ;
716+ expect ( await du . getDownloadUrl ( ) ) . toBe (
717+ 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.2.tgz'
718+ ) ;
719+ expect ( console . warn ) . toHaveBeenCalledTimes ( 1 ) ;
720+ } ) ;
721+
722+ it ( 'for archstrike for 4.4.2' , async ( ) => {
723+ jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
724+
725+ const du = new MongoBinaryDownloadUrl ( {
726+ platform : 'linux' ,
727+ arch : 'x64' ,
728+ version : '4.4.2' ,
729+ os : {
730+ os : 'linux' ,
731+ dist : 'ArchStrike' ,
732+ release : 'rolling' ,
733+ id_like : [ 'arch' ] ,
734+ } ,
735+ } ) ;
736+ expect ( await du . getDownloadUrl ( ) ) . toBe (
737+ 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.2.tgz'
738+ ) ;
739+ expect ( console . warn ) . toHaveBeenCalledTimes ( 1 ) ;
740+ } ) ;
741+ } ) ;
742+
640743 it ( 'fallback' , async ( ) => {
641744 jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
642745
@@ -677,46 +780,6 @@ describe('MongoBinaryDownloadUrl', () => {
677780 expect ( console . warn ) . toHaveBeenCalledTimes ( 2 ) ;
678781 } ) ;
679782
680- it ( 'for manjaro' , async ( ) => {
681- jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
682-
683- const du = new MongoBinaryDownloadUrl ( {
684- platform : 'linux' ,
685- arch : 'x64' ,
686- version : '4.4.2' ,
687- os : {
688- os : 'linux' ,
689- dist : 'ManjaroLinux' ,
690- release : '20.2' ,
691- id_like : [ 'arch' ] ,
692- } ,
693- } ) ;
694- expect ( await du . getDownloadUrl ( ) ) . toBe (
695- 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.2.tgz'
696- ) ;
697- expect ( console . warn ) . toHaveBeenCalledTimes ( 1 ) ;
698- } ) ;
699-
700- it ( 'for arch' , async ( ) => {
701- jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
702-
703- const du = new MongoBinaryDownloadUrl ( {
704- platform : 'linux' ,
705- arch : 'x64' ,
706- version : '4.4.2' ,
707- os : {
708- os : 'linux' ,
709- dist : 'Arch' ,
710- release : 'rolling' ,
711- id_like : [ 'arch' ] ,
712- } ,
713- } ) ;
714- expect ( await du . getDownloadUrl ( ) ) . toBe (
715- 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.2.tgz'
716- ) ;
717- expect ( console . warn ) . toHaveBeenCalledTimes ( 1 ) ;
718- } ) ;
719-
720783 describe ( 'for gentoo' , ( ) => {
721784 it ( 'for gentoo 5.0.8' , async ( ) => {
722785 jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
@@ -757,26 +820,6 @@ describe('MongoBinaryDownloadUrl', () => {
757820 } ) ;
758821 } ) ;
759822
760- it ( 'for unpopular arch' , async ( ) => {
761- jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
762-
763- const du = new MongoBinaryDownloadUrl ( {
764- platform : 'linux' ,
765- arch : 'x64' ,
766- version : '4.4.2' ,
767- os : {
768- os : 'linux' ,
769- dist : 'ArchStrike' ,
770- release : 'rolling' ,
771- id_like : [ 'arch' ] ,
772- } ,
773- } ) ;
774- expect ( await du . getDownloadUrl ( ) ) . toBe (
775- 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.2.tgz'
776- ) ;
777- expect ( console . warn ) . toHaveBeenCalledTimes ( 1 ) ;
778- } ) ;
779-
780823 describe ( 'for elementary' , ( ) => {
781824 it ( 'should return a archive name for elementary 0.3' , async ( ) => {
782825 const du = new MongoBinaryDownloadUrl ( {
@@ -1684,7 +1727,7 @@ describe('MongoBinaryDownloadUrl', () => {
16841727 } ) ;
16851728
16861729 describe ( 'getLinuxOSVersionString()' , ( ) => {
1687- it ( 'should give an warning about "alpine"' , ( ) => {
1730+ it ( 'should give a warning about "alpine"' , ( ) => {
16881731 jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
16891732 const du = new MongoBinaryDownloadUrl ( {
16901733 platform : 'linux' ,
@@ -1704,7 +1747,7 @@ describe('MongoBinaryDownloadUrl', () => {
17041747 expect ( ret ) . toBe ( '' ) ;
17051748 } ) ;
17061749
1707- it ( 'should give an warning about "unknown"' , ( ) => {
1750+ it ( 'should give a warning about "unknown"' , ( ) => {
17081751 jest . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => void 0 ) ;
17091752 const du = new MongoBinaryDownloadUrl ( {
17101753 platform : 'linux' ,
0 commit comments