config test fix

This commit is contained in:
Kay Craig
2023-12-20 13:56:13 -05:00
parent 4fba7c6c63
commit 05fc7dee12
2 changed files with 7 additions and 7 deletions

View File

@@ -1245,7 +1245,6 @@ func TestLdapAuthBackend_ConfigUpgrade(t *testing.T) {
DerefAliases: "never",
MaximumPageSize: 1000,
},
RotationSchedule: "",
}
configEntry, err := b.Config(ctx, configReq)

View File

@@ -120,13 +120,14 @@ func (b *backend) Config(ctx context.Context, req *logical.Request) (*ldapConfig
persistNeeded = true
}
if result.RotationSchedule == "" {
result.RotationSchedule = "0 0 0 0 0"
}
// leave these blank if unset, which would mean no rotation at all
//if result.RotationSchedule == "" {
// result.RotationSchedule = "0 0 0 0 0"
//}
if result.RotationWindow == 0 {
// default rotation windoe
}
//if result.RotationWindow == 0 {
// // default rotation windoe
//}
if persistNeeded && (b.System().LocalMount() || !b.System().ReplicationState().HasState(consts.ReplicationPerformanceSecondary|consts.ReplicationPerformanceStandby)) {
entry, err := logical.StorageEntryJSON("config", result)