Pin MongoDB test container images pre-v6 (#16880)

v6 was released in the last 24h, and our tests fail to connect to the db when v6 is used.
Using v6 needs investigating, but for now I'm pinning to the last known good version.
This commit is contained in:
Tom Proctor
2022-08-25 16:14:37 +01:00
committed by GitHub
parent bd8d762732
commit 247a019be0
3 changed files with 10 additions and 10 deletions

View File

@@ -708,7 +708,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) {

View File

@@ -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,
@@ -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,
@@ -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,

View File

@@ -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()
@@ -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()
@@ -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()
@@ -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{
@@ -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()
@@ -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"