From d04d2e530baad1470736a601dfcafd4162952ae4 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 16 Jul 2025 11:00:38 -0600 Subject: refactor: rename CedarAuthorizer to cedar::Authorizer --- tests/authorization/cedar_authorizer_test.rs | 6 ++---- tests/support/factory_bot.rs | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/authorization/cedar_authorizer_test.rs b/tests/authorization/cedar_authorizer_test.rs index b169be7d..4938033c 100644 --- a/tests/authorization/cedar_authorizer_test.rs +++ b/tests/authorization/cedar_authorizer_test.rs @@ -6,14 +6,12 @@ mod tests { use envoy_types::pb::envoy::service::auth::v3::attribute_context::HttpRequest; use std::collections::HashMap; - fn subject() -> authzd::authorization::cedar::CedarAuthorizer { + fn subject() -> authzd::authorization::cedar::Authorizer { common::setup(); subject_with(cedar_policy::Entities::empty()) } - fn subject_with( - entities: cedar_policy::Entities, - ) -> authzd::authorization::cedar::CedarAuthorizer { + fn subject_with(entities: cedar_policy::Entities) -> authzd::authorization::cedar::Authorizer { build_cedar_authorizer(entities) } diff --git a/tests/support/factory_bot.rs b/tests/support/factory_bot.rs index c3ad781d..08deaa15 100644 --- a/tests/support/factory_bot.rs +++ b/tests/support/factory_bot.rs @@ -39,10 +39,10 @@ pub fn build_headers(headers: Vec<(String, String)>) -> HashMap pub fn build_cedar_authorizer( entities: cedar_policy::Entities, -) -> authzd::authorization::cedar::CedarAuthorizer { +) -> authzd::authorization::cedar::Authorizer { let realpath = std::fs::canonicalize("./etc/authzd").unwrap(); let path = realpath.as_path(); - authzd::authorization::cedar::CedarAuthorizer::new_from(path, entities) + authzd::authorization::cedar::Authorizer::new_from(path, entities) } pub async fn build_channel(addr: SocketAddr) -> Channel { -- cgit v1.2.3