mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
test: pin docker image on postgres to 13.4-buster (#12636)
* test: pin docker image on postgres to 13.4-buster * test: update all tests that uses postgres image to use 13.4-buster
This commit is contained in:
committed by
GitHub
parent
20a0ad3508
commit
8c9d93b852
@@ -345,7 +345,7 @@ func TestBackend_BadConnectionString(t *testing.T) {
|
||||
}
|
||||
defer b.Cleanup(context.Background())
|
||||
|
||||
cleanup, _ := postgreshelper.PrepareTestContainer(t, "latest")
|
||||
cleanup, _ := postgreshelper.PrepareTestContainer(t, "13.4-buster")
|
||||
defer cleanup()
|
||||
|
||||
respCheck := func(req *logical.Request) {
|
||||
@@ -394,7 +394,7 @@ func TestBackend_basic(t *testing.T) {
|
||||
}
|
||||
defer b.Cleanup(context.Background())
|
||||
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "latest")
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "13.4-buster")
|
||||
defer cleanup()
|
||||
|
||||
// Configure a connection
|
||||
@@ -601,7 +601,7 @@ func TestBackend_connectionCrud(t *testing.T) {
|
||||
}
|
||||
defer b.Cleanup(context.Background())
|
||||
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "latest")
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "13.4-buster")
|
||||
defer cleanup()
|
||||
|
||||
// Configure a connection
|
||||
@@ -789,7 +789,7 @@ func TestBackend_roleCrud(t *testing.T) {
|
||||
}
|
||||
defer b.Cleanup(context.Background())
|
||||
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "latest")
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "13.4-buster")
|
||||
defer cleanup()
|
||||
|
||||
// Configure a connection
|
||||
@@ -1038,7 +1038,7 @@ func TestBackend_allowedRoles(t *testing.T) {
|
||||
}
|
||||
defer b.Cleanup(context.Background())
|
||||
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "latest")
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "13.4-buster")
|
||||
defer cleanup()
|
||||
|
||||
// Configure a connection
|
||||
@@ -1235,7 +1235,7 @@ func TestBackend_RotateRootCredentials(t *testing.T) {
|
||||
}
|
||||
defer b.Cleanup(context.Background())
|
||||
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "latest")
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "13.4-buster")
|
||||
defer cleanup()
|
||||
|
||||
connURL = strings.Replace(connURL, "postgres:secret", "{{username}}:{{password}}", -1)
|
||||
|
||||
@@ -701,7 +701,7 @@ func assertWALCount(t *testing.T, s logical.Storage, expected int, key string) {
|
||||
type userCreator func(t *testing.T, username, password string)
|
||||
|
||||
func TestBackend_StaticRole_Rotations_PostgreSQL(t *testing.T) {
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "latest")
|
||||
cleanup, connURL := postgreshelper.PrepareTestContainer(t, "13.4-buster")
|
||||
defer cleanup()
|
||||
uc := userCreator(func(t *testing.T, username, password string) {
|
||||
createTestPGUser(t, connURL, username, password, testRoleStaticCreate)
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func getPostgreSQL(t *testing.T, options map[string]interface{}) (*PostgreSQL, func()) {
|
||||
cleanup, connURL := postgresql.PrepareTestContainer(t, "latest")
|
||||
cleanup, connURL := postgresql.PrepareTestContainer(t, "13.4-buster")
|
||||
|
||||
connectionDetails := map[string]interface{}{
|
||||
"connection_url": connURL,
|
||||
@@ -867,7 +867,7 @@ func TestUsernameGeneration(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNewUser_CustomUsername(t *testing.T) {
|
||||
cleanup, connURL := postgresql.PrepareTestContainer(t, "latest")
|
||||
cleanup, connURL := postgresql.PrepareTestContainer(t, "13.4-buster")
|
||||
defer cleanup()
|
||||
|
||||
type testCase struct {
|
||||
|
||||
Reference in New Issue
Block a user