Skip to content

Commit

Permalink
fix oldest version for ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
theleeeo authored and saniales committed Dec 27, 2023
1 parent 65ce3a7 commit 44034e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mongobin/downloadSpec.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func osNameFromUbuntuRelease(majorVersion int, mongoVersion []int) string {
if majorVersion >= 22 && versionGTE(mongoVersion, []int{6, 0, 4}) {
return "ubuntu2204"
}
if majorVersion >= 20 && versionGTE(mongoVersion, []int{4, 0, 1}) {
if majorVersion >= 20 && versionGTE(mongoVersion, []int{4, 4, 0}) {
return "ubuntu2004"
}
if majorVersion >= 18 && versionGTE(mongoVersion, []int{4, 0, 1}) {
Expand Down
8 changes: 4 additions & 4 deletions mongobin/downloadSpec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestMakeDownloadSpec(t *testing.T) {
Platform: "linux",
SSLBuildNeeded: false,
Arch: "x86_64",
OSName: "ubuntu2204",
OSName: "ubuntu1804", // Ubuntu 22.04 is not supported by Mongo 4.0.5, so it falls back to Ubuntu 18.04
},
},
"ubuntu 20.04": {
Expand All @@ -110,7 +110,7 @@ func TestMakeDownloadSpec(t *testing.T) {
Platform: "linux",
SSLBuildNeeded: false,
Arch: "x86_64",
OSName: "ubuntu2004",
OSName: "ubuntu1804", // Ubuntu 20.04 is not supported by Mongo 4.0.5, so it falls back to Ubuntu 18.04
},
},
"arm64 ubuntu 20.04 and newer mongo": {
Expand Down Expand Up @@ -531,14 +531,14 @@ func TestMakeDownloadSpec(t *testing.T) {
etcFolder: "ubuntu2004",
goArch: "arm64",

expectedError: "memongo does not support automatic downloading on your system: Mongo doesn't support your environment, ubuntu2004/arm64, on version 4.1.0",
expectedError: "memongo does not support automatic downloading on your system: Mongo doesn't support your environment, ubuntu1804/arm64, on version 4.1.0", // The OS name is wrong because we don't support Ubuntu 20.04 on Mongo 4.1.0 so it falls back to Ubuntu 18.04
},
"MongoDB Unsupported older version for arm64 ubuntu2204": {
mongoVersion: "4.1.0",
etcFolder: "ubuntu2204",
goArch: "arm64",

expectedError: "memongo does not support automatic downloading on your system: Mongo doesn't support your environment, ubuntu2204/arm64, on version 4.1.0",
expectedError: "memongo does not support automatic downloading on your system: Mongo doesn't support your environment, ubuntu1804/arm64, on version 4.1.0", // The OS name is wrong because we don't support Ubuntu 22.04 on Mongo 4.1.0 so it falls back to Ubuntu 18.04
},
"MongoDB Unsupported older version for arm64 amazon2": {
mongoVersion: "4.1.0",
Expand Down

0 comments on commit 44034e8

Please sign in to comment.