mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 18:06:11 +02:00
copy rolconfig during password rotation (#2183)
* copy rolconfig during password rotation Co-authored-by: idanovinda <idanovinda@gmail.com>
This commit is contained in:
co-authored by
idanovinda
parent
63c9f916a6
commit
4741b3f734
@@ -22,6 +22,7 @@ import (
|
||||
"github.com/zalando/postgres-operator/pkg/spec"
|
||||
"github.com/zalando/postgres-operator/pkg/util"
|
||||
"github.com/zalando/postgres-operator/pkg/util/config"
|
||||
"github.com/zalando/postgres-operator/pkg/util/constants"
|
||||
"github.com/zalando/postgres-operator/pkg/util/k8sutil"
|
||||
"github.com/zalando/postgres-operator/pkg/util/patroni"
|
||||
"k8s.io/client-go/kubernetes/fake"
|
||||
@@ -593,7 +594,7 @@ func TestUpdateSecret(t *testing.T) {
|
||||
t.Errorf("%s: username differs in updated secret: expected %s, got %s", testName, username, secretUsername)
|
||||
}
|
||||
} else {
|
||||
rotatedUsername := username + dayAfterTomorrow.Format("060102")
|
||||
rotatedUsername := username + dayAfterTomorrow.Format(constants.RotationUserDateFormat)
|
||||
if secretUsername != rotatedUsername {
|
||||
t.Errorf("%s: updated secret does not contain correct username: expected %s, got %s", testName, rotatedUsername, secretUsername)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user