summaryrefslogtreecommitdiff
path: root/tests/authorization/check_service_test.rs
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-06-26 15:30:41 -0600
committermo khan <mo@mokhan.ca>2025-06-26 15:30:41 -0600
commit187c02e9bf32f152cbca9fd5790f4a6070dbb37d (patch)
tree77a8cefe9c95d4f67522d02f0247194c3b39f173 /tests/authorization/check_service_test.rs
parent91a989b761f97a70e76031988cf570ad5d209f47 (diff)
refactor: try to move policy files to /etc/authzd/
Diffstat (limited to 'tests/authorization/check_service_test.rs')
-rw-r--r--tests/authorization/check_service_test.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/authorization/check_service_test.rs b/tests/authorization/check_service_test.rs
index 0582417e..a739b16a 100644
--- a/tests/authorization/check_service_test.rs
+++ b/tests/authorization/check_service_test.rs
@@ -11,7 +11,7 @@ mod tests {
#[tokio::test]
async fn test_check_allows_valid_bearer_token() {
let token = create_token();
- let server = CheckService::new(Arc::new(CedarAuthorizer::new()));
+ let server = CheckService::new(Arc::new(CedarAuthorizer::default()));
let mut headers = HashMap::new();
headers.insert("authorization".to_string(), format!("Bearer {}", token));
@@ -30,7 +30,7 @@ mod tests {
#[tokio::test]
async fn test_check_denies_invalid_bearer_token() {
- let authorizer = Arc::new(CedarAuthorizer::new());
+ let authorizer = Arc::new(CedarAuthorizer::default());
let server = CheckService::new(authorizer);
let request = tonic::Request::new(create_request(|item: &mut HttpRequest| {
item.headers = HashMap::new();