Format policies

This commit is contained in:
Eric Eastwood
2026-05-08 14:41:26 -05:00
parent 31653438b5
commit f31c741724
2 changed files with 8 additions and 12 deletions
@@ -308,13 +308,12 @@ test_session_limiting_under_max_session_threshold if {
"allow": authorization_grant.allow,
"need_to_remove_sessions": need_to_remove_sessions(authorization_grant.violation),
} with input.user as user
# Some value above `soft_limit` but below `max_session_threshold`
with input.session_counts as {"total": 42}
with input.session_counts as {"total": 42} # Some value above `soft_limit` but below `max_session_threshold`
with data.session_limit as {
"soft_limit": 32,
"hard_limit": 64,
# The main thing we're trying to test
"max_session_threshold": 64
"max_session_threshold": 64,
}
not result.allow
result.need_to_remove_sessions == 11
@@ -325,13 +324,12 @@ test_no_session_limiting_past_max_session_threshold if {
"allow": authorization_grant.allow,
"need_to_remove_sessions": need_to_remove_sessions(authorization_grant.violation),
} with input.user as user
# Some value above the limits and `max_session_threshold`
with input.session_counts as {"total": 128}
with input.session_counts as {"total": 128} # Some value above the limits and `max_session_threshold`
with data.session_limit as {
"soft_limit": 32,
"hard_limit": 64,
# The main thing we're trying to test
"max_session_threshold": 64
"max_session_threshold": 64,
}
result.allow
result.need_to_remove_sessions == 0
+4 -6
View File
@@ -204,15 +204,14 @@ test_session_limiting_under_max_session_threshold if {
"allow": compat_login.allow,
"need_to_remove_sessions": need_to_remove_sessions(compat_login.violation),
} with input.user as user
# Some value above `soft_limit` but below `max_session_threshold`
with input.session_counts as {"total": 42}
with input.session_counts as {"total": 42} # Some value above `soft_limit` but below `max_session_threshold`
with input.login as {"type": "m.login.sso"}
with input.session_replaced as false
with data.session_limit as {
"soft_limit": 32,
"hard_limit": 64,
# The main thing we're trying to test
"max_session_threshold": 64
"max_session_threshold": 64,
}
not result.allow
result.need_to_remove_sessions == 11
@@ -223,15 +222,14 @@ test_no_session_limiting_past_max_session_threshold if {
"allow": compat_login.allow,
"need_to_remove_sessions": need_to_remove_sessions(compat_login.violation),
} with input.user as user
# Some value above the limits and `max_session_threshold`
with input.session_counts as {"total": 128}
with input.session_counts as {"total": 128} # Some value above the limits and `max_session_threshold`
with input.login as {"type": "m.login.sso"}
with input.session_replaced as false
with data.session_limit as {
"soft_limit": 32,
"hard_limit": 64,
# The main thing we're trying to test
"max_session_threshold": 64
"max_session_threshold": 64,
}
result.allow
result.need_to_remove_sessions == 0