File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,12 @@ import (
2121 "io"
2222 "regexp"
2323 "sort"
24+ "strconv"
2425 "strings"
2526 "time"
2627
2728 "github.com/AlecAivazis/survey/v2"
29+ "github.com/Masterminds/semver/v3"
2830 "github.com/briandowns/spinner"
2931 "github.com/mongodb/atlas-cli-core/config"
3032 "github.com/mongodb/mongodb-atlas-cli/atlascli/internal/cli"
@@ -156,7 +158,8 @@ func getLocalDevImage() string {
156158}
157159
158160func (opts * DeploymentOpts ) MongodDockerImageName () string {
159- return getLocalDevImage () + ":" + opts .MdbVersion
161+ v , _ := semver .NewVersion (opts .MdbVersion )
162+ return getLocalDevImage () + ":" + strconv .FormatUint (v .Major (), 10 )
160163}
161164
162165func (opts * DeploymentOpts ) Spin (funcs ... func () error ) error {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ import (
5353const (
5454 internalMongodPort = 27017
5555 mdb7 = "7.0"
56- mdb8 = "8.2 "
56+ mdb8 = "8.0 "
5757 defaultSettings = "default"
5858 customSettings = "custom"
5959 cancelSettings = "cancel"
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ func TestSetupOpts_LocalDev_HappyPathClean(t *testing.T) {
6565 force : true ,
6666 }
6767
68- const dockerImageName = "docker.io/mongodb/mongodb-atlas-local:8.2 "
68+ const dockerImageName = "docker.io/mongodb/mongodb-atlas-local:8"
6969
7070 // Container engine is fine
7171 deploymentTest .MockContainerEngine .EXPECT ().Ready ().Return (nil ).Times (1 )
@@ -130,7 +130,7 @@ func TestSetupOpts_LocalDev_HappyPathOfflinePull(t *testing.T) {
130130 force : true ,
131131 }
132132
133- const dockerImageName = "docker.io/mongodb/mongodb-atlas-local:8.2 "
133+ const dockerImageName = "docker.io/mongodb/mongodb-atlas-local:8"
134134
135135 // Container engine is fine
136136 deploymentTest .MockContainerEngine .EXPECT ().Ready ().Return (nil ).Times (1 )
@@ -198,7 +198,7 @@ func TestSetupOpts_LocalDev_UnhappyPathOfflinePull(t *testing.T) {
198198 force : true ,
199199 }
200200
201- const dockerImageName = "docker.io/mongodb/mongodb-atlas-local:8.2 "
201+ const dockerImageName = "docker.io/mongodb/mongodb-atlas-local:8"
202202
203203 // Container engine is fine
204204 deploymentTest .MockContainerEngine .EXPECT ().Ready ().Return (nil ).Times (1 )
@@ -274,7 +274,7 @@ func TestSetupOpts_LocalDev_RemoveUnhealthyDeployment(t *testing.T) {
274274 force : true ,
275275 }
276276
277- const dockerImageName = "docker.io/mongodb/mongodb-atlas-local:8.2 "
277+ const dockerImageName = "docker.io/mongodb/mongodb-atlas-local:8"
278278
279279 // Container engine is fine
280280 deploymentTest .MockContainerEngine .EXPECT ().Ready ().Return (nil ).Times (1 )
You can’t perform that action at this time.
0 commit comments