diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-16 11:00:38 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-16 11:00:38 -0600 |
| commit | d04d2e530baad1470736a601dfcafd4162952ae4 (patch) | |
| tree | 0010865ce965374be699b25aef1b008fc6bf0ace /tests | |
| parent | fb05a439113daf8750be6df025f9676221d8e228 (diff) | |
refactor: rename CedarAuthorizer to cedar::Authorizer
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/authorization/cedar_authorizer_test.rs | 6 | ||||
| -rw-r--r-- | tests/support/factory_bot.rs | 4 |
2 files changed, 4 insertions, 6 deletions
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<String, String> 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 { |
