mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
Add minimum_retention_months to config endpoint (#20150)
This commit is contained in:
4
changelog/20150.txt
Normal file
4
changelog/20150.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
```release-note:improvement
|
||||
api: `/sys/internal/counters/config` endpoint now contains read-only
|
||||
`minimum_retention_months`.
|
||||
```
|
||||
@@ -840,6 +840,7 @@ func TestActivityLog_API_ConfigCRUD(t *testing.T) {
|
||||
"queries_available": false,
|
||||
"reporting_enabled": core.censusLicensingEnabled,
|
||||
"billing_start_timestamp": core.GetBillingStart(),
|
||||
"minimum_retention_months": core.activityLog.configOverrides.MinimumRetentionMonths,
|
||||
}
|
||||
|
||||
if diff := deep.Equal(resp.Data, defaults); len(diff) > 0 {
|
||||
@@ -921,8 +922,9 @@ func TestActivityLog_API_ConfigCRUD(t *testing.T) {
|
||||
"retention_months": 2,
|
||||
"enabled": "enable",
|
||||
"queries_available": false,
|
||||
"reporting_enabled": false,
|
||||
"reporting_enabled": core.censusLicensingEnabled,
|
||||
"billing_start_timestamp": core.GetBillingStart(),
|
||||
"minimum_retention_months": core.activityLog.configOverrides.MinimumRetentionMonths,
|
||||
}
|
||||
|
||||
if diff := deep.Equal(resp.Data, expected); len(diff) > 0 {
|
||||
@@ -959,8 +961,9 @@ func TestActivityLog_API_ConfigCRUD(t *testing.T) {
|
||||
"retention_months": 24,
|
||||
"enabled": activityLogEnabledDefaultValue,
|
||||
"queries_available": false,
|
||||
"reporting_enabled": false,
|
||||
"reporting_enabled": core.censusLicensingEnabled,
|
||||
"billing_start_timestamp": core.GetBillingStart(),
|
||||
"minimum_retention_months": core.activityLog.configOverrides.MinimumRetentionMonths,
|
||||
}
|
||||
|
||||
if diff := deep.Equal(resp.Data, defaults); len(diff) > 0 {
|
||||
|
||||
@@ -310,6 +310,7 @@ func (b *SystemBackend) handleActivityConfigRead(ctx context.Context, req *logic
|
||||
"queries_available": qa,
|
||||
"reporting_enabled": b.Core.censusLicensingEnabled,
|
||||
"billing_start_timestamp": b.Core.GetBillingStart(),
|
||||
"minimum_retention_months": a.configOverrides.MinimumRetentionMonths,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user