Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of Pin MongoDB test container images pre-v6 into release/1.10.x #16883

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builtin/logical/database/rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ func TestBackend_StaticRole_Rotations_PostgreSQL(t *testing.T) {
}

func TestBackend_StaticRole_Rotations_MongoDB(t *testing.T) {
cleanup, connURL := mongodb.PrepareTestContainerWithDatabase(t, "latest", "vaulttestdb")
cleanup, connURL := mongodb.PrepareTestContainerWithDatabase(t, "5.0.10", "vaulttestdb")
defer cleanup()

uc := userCreator(func(t *testing.T, username, password string) {
Expand Down
6 changes: 3 additions & 3 deletions builtin/logical/mongodb/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestBackend_basic(t *testing.T) {
t.Fatal(err)
}

cleanup, connURI := mongodb.PrepareTestContainer(t, "latest")
cleanup, connURI := mongodb.PrepareTestContainer(t, "5.0.10")
defer cleanup()
connData := map[string]interface{}{
"uri": connURI,
Expand All @@ -81,7 +81,7 @@ func TestBackend_roleCrud(t *testing.T) {
t.Fatal(err)
}

cleanup, connURI := mongodb.PrepareTestContainer(t, "latest")
cleanup, connURI := mongodb.PrepareTestContainer(t, "5.0.10")
defer cleanup()
connData := map[string]interface{}{
"uri": connURI,
Expand All @@ -107,7 +107,7 @@ func TestBackend_leaseWriteRead(t *testing.T) {
t.Fatal(err)
}

cleanup, connURI := mongodb.PrepareTestContainer(t, "latest")
cleanup, connURI := mongodb.PrepareTestContainer(t, "5.0.10")
defer cleanup()
connData := map[string]interface{}{
"uri": connURI,
Expand Down
12 changes: 6 additions & 6 deletions plugins/database/mongodb/mongodb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
const mongoAdminRole = `{ "db": "admin", "roles": [ { "role": "readWrite" } ] }`

func TestMongoDB_Initialize(t *testing.T) {
cleanup, connURL := mongodb.PrepareTestContainer(t, "latest")
cleanup, connURL := mongodb.PrepareTestContainer(t, "5.0.10")
defer cleanup()

db := new()
Expand Down Expand Up @@ -120,7 +120,7 @@ func TestNewUser_usernameTemplate(t *testing.T) {

for name, test := range tests {
t.Run(name, func(t *testing.T) {
cleanup, connURL := mongodb.PrepareTestContainer(t, "latest")
cleanup, connURL := mongodb.PrepareTestContainer(t, "5.0.10")
defer cleanup()

db := new()
Expand All @@ -146,7 +146,7 @@ func TestNewUser_usernameTemplate(t *testing.T) {
}

func TestMongoDB_CreateUser(t *testing.T) {
cleanup, connURL := mongodb.PrepareTestContainer(t, "latest")
cleanup, connURL := mongodb.PrepareTestContainer(t, "5.0.10")
defer cleanup()

db := new()
Expand Down Expand Up @@ -178,7 +178,7 @@ func TestMongoDB_CreateUser(t *testing.T) {
}

func TestMongoDB_CreateUser_writeConcern(t *testing.T) {
cleanup, connURL := mongodb.PrepareTestContainer(t, "latest")
cleanup, connURL := mongodb.PrepareTestContainer(t, "5.0.10")
defer cleanup()

initReq := dbplugin.InitializeRequest{
Expand Down Expand Up @@ -212,7 +212,7 @@ func TestMongoDB_CreateUser_writeConcern(t *testing.T) {
}

func TestMongoDB_DeleteUser(t *testing.T) {
cleanup, connURL := mongodb.PrepareTestContainer(t, "latest")
cleanup, connURL := mongodb.PrepareTestContainer(t, "5.0.10")
defer cleanup()

db := new()
Expand Down Expand Up @@ -252,7 +252,7 @@ func TestMongoDB_DeleteUser(t *testing.T) {
}

func TestMongoDB_UpdateUser_Password(t *testing.T) {
cleanup, connURL := mongodb.PrepareTestContainer(t, "latest")
cleanup, connURL := mongodb.PrepareTestContainer(t, "5.0.10")
defer cleanup()

// The docker test method PrepareTestContainer defaults to a database "test"
Expand Down