fix: reapply-storage-policy

This commit is contained in:
Damian Debkowski authored and Louis Ruch committed 2024-01-16 13:53:44 -08:00
1 parent 621b535dde
commit 2dda19aafe
12 files changed
+104 -10

No files matched your search

@@ -25,6 +25,7 @@ var (
action.Read,
action.Download,
action.Delete,
action.ReApplyStoragePolicy,
)
// CollectionActions contains the set of actions that can be performed on
@@ -63,7 +63,7 @@ func Test_newRateLimiterConfig(t *testing.T) {
ratelimit.DefaultLimiterMaxQuotas(),
false,
&rateLimiterConfig{
maxSize: 314157,
maxSize: 316158,
configs: nil,
disabled: false,
limits: defaultLimits,
@@ -642,7 +642,7 @@ func Test_rateLimiterConfig_writeSysEvent(t *testing.T) {
wantResourceLimits := v.(map[string]interface{})
gotResourceLimits := gotv.(map[string]interface{})
require.Equal(t, len(gotResourceLimits), len(wantResourceLimits))
require.Equal(t, len(wantResourceLimits), len(gotResourceLimits))
for k, v := range wantResourceLimits {
gotv, ok := gotResourceLimits[k]
@@ -2791,6 +2791,32 @@
]
},
"session-recording": {
"reapply-storage-policy": [
{
"action": "reapply-storage-policy",
"limit": 30000,
"per": "total",
"period": "30s",
"resource": "session-recording",
"unlimited": false
},
{
"action": "reapply-storage-policy",
"limit": 3000,
"per": "auth-token",
"period": "30s",
"resource": "session-recording",
"unlimited": false
},
{
"action": "reapply-storage-policy",
"limit": 30000,
"per": "ip-address",
"period": "30s",
"resource": "session-recording",
"unlimited": false
}
],
"download": [
{
"action": "download",
@@ -3971,7 +3997,7 @@
]
}
},
"max_size": 314157,
"max_size": 316158,
"msg": "controller api rate limiter"
},
"op": "controller.(rateLimiterConfig).writeSysEvent",
@@ -2791,6 +2791,32 @@
]
},
"session-recording": {
"reapply-storage-policy": [
{
"action": "reapply-storage-policy",
"limit": 30000,
"per": "total",
"period": "30s",
"resource": "session-recording",
"unlimited": false
},
{
"action": "reapply-storage-policy",
"limit": 3000,
"per": "auth-token",
"period": "30s",
"resource": "session-recording",
"unlimited": false
},
{
"action": "reapply-storage-policy",
"limit": 30000,
"per": "ip-address",
"period": "30s",
"resource": "session-recording",
"unlimited": false
}
],
"download": [
{
"action": "download",
@@ -2791,6 +2791,32 @@
]
},
"session-recording": {
"reapply-storage-policy": [
{
"action": "reapply-storage-policy",
"limit": 100,
"per": "total",
"period": "1m0s",
"resource": "session-recording",
"unlimited": false
},
{
"action": "reapply-storage-policy",
"limit": 100,
"per": "auth-token",
"period": "1m0s",
"resource": "session-recording",
"unlimited": false
},
{
"action": "reapply-storage-policy",
"limit": 100,
"per": "ip-address",
"period": "1m0s",
"resource": "session-recording",
"unlimited": false
}
],
"download": [
{
"action": "download",
@@ -3971,7 +3997,7 @@
]
}
},
"max_size": 314157,
"max_size": 316158,
"msg": "controller api rate limiter"
},
"op": "controller.(rateLimiterConfig).writeSysEvent",