Skip to content

Commit 2d57c42

Browse files
takanuva15saniales
authored andcommitted
Add support for Mongo v8 with wiredTiger
1 parent f21de18 commit 2d57c42

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

memongo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func StartWithOptions(opts *Options) (*Server, error) {
7070
if opts.ShouldUseReplica {
7171
engine = "wiredTiger"
7272
args = append(args, "--replSet", "rs0")
73-
} else if strings.HasPrefix(opts.MongoVersion, "7.") {
73+
} else if strings.HasPrefix(opts.MongoVersion, "7.") || strings.HasPrefix(opts.MongoVersion, "8.") {
7474
engine = "wiredTiger"
7575
}
7676
if engine == "wiredTiger" {

memongo_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
)
1818

1919
func TestDefaultOptions(t *testing.T) {
20-
versions := []string{"4.4.7", "5.0.0", "7.0.0"}
20+
versions := []string{"4.4.7", "5.0.0", "7.0.0", "8.0.0"}
2121

2222
for _, version := range versions {
2323
t.Run(version, func(t *testing.T) {
@@ -37,7 +37,7 @@ func TestDefaultOptions(t *testing.T) {
3737
}
3838

3939
func TestWithReplica(t *testing.T) {
40-
versions := []string{"4.4.7", "5.0.0", "7.0.0"}
40+
versions := []string{"4.4.7", "5.0.0", "7.0.0", "8.0.0"}
4141

4242
for _, version := range versions {
4343
t.Run(version, func(t *testing.T) {
@@ -62,7 +62,7 @@ func TestWithReplica(t *testing.T) {
6262
}
6363

6464
func TestWithAuth(t *testing.T) {
65-
versions := []string{"4.4.7", "5.0.0", "7.0.0"}
65+
versions := []string{"4.4.7", "5.0.0", "7.0.0", "8.0.0"}
6666

6767
for _, version := range versions {
6868
t.Run(version, func(t *testing.T) {
@@ -120,7 +120,7 @@ func TestWithAuth(t *testing.T) {
120120
}
121121

122122
func TestWithReplicaAndAuth(t *testing.T) {
123-
versions := []string{"4.4.7", "5.0.0", "7.0.0"}
123+
versions := []string{"4.4.7", "5.0.0", "7.0.0", "8.0.0"}
124124

125125
for _, version := range versions {
126126
t.Run(version, func(t *testing.T) {

0 commit comments

Comments
 (0)