mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
fix(auth): update focused test adapters
Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
This commit is contained in:
@@ -460,6 +460,10 @@ mod tests {
|
||||
}
|
||||
|
||||
impl AuthorizationProvider for AllowProvider {
|
||||
fn profile_id(&self) -> AuthorizationProfileId {
|
||||
profile()
|
||||
}
|
||||
|
||||
fn authorize<'a>(
|
||||
&'a self,
|
||||
request: &'a AuthorizationRequest,
|
||||
|
||||
@@ -1208,6 +1208,13 @@ mod tests {
|
||||
struct SyntheticUnavailableProvider;
|
||||
|
||||
impl AuthorizationProvider for SyntheticUnavailableProvider {
|
||||
fn profile_id(&self) -> buzz_auth::AuthorizationProfileId {
|
||||
buzz_auth::AuthorizationProfileId::from_server_configuration(
|
||||
"profile.synthetic-unavailable.example",
|
||||
)
|
||||
.expect("synthetic profile is valid")
|
||||
}
|
||||
|
||||
fn authorize<'a>(
|
||||
&'a self,
|
||||
_request: &'a AuthorizationRequest,
|
||||
|
||||
@@ -3275,9 +3275,15 @@ mod tests {
|
||||
)
|
||||
.await
|
||||
.expect("commit active projection");
|
||||
db.revoke_identity_key(community, subject.as_bytes(), None, "synthetic revocation")
|
||||
.await
|
||||
.expect("revoke synthetic key");
|
||||
db.revoke_identity_key(
|
||||
community,
|
||||
buzz_db::identity_lifecycle::LifecycleOperationId::issue(),
|
||||
subject.as_bytes(),
|
||||
subject.as_bytes(),
|
||||
"synthetic revocation",
|
||||
)
|
||||
.await
|
||||
.expect("revoke synthetic key");
|
||||
|
||||
let observational = make_community(&pool).await;
|
||||
let observational_keys = Keys::generate();
|
||||
@@ -3319,8 +3325,9 @@ mod tests {
|
||||
.expect("commit observational projection");
|
||||
db.revoke_identity_key(
|
||||
observational,
|
||||
buzz_db::identity_lifecycle::LifecycleOperationId::issue(),
|
||||
observational_subject.as_bytes(),
|
||||
observational_subject.as_bytes(),
|
||||
None,
|
||||
"observational revocation",
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user