diff options
| author | mo khan <mo@mokhan.ca> | 2025-06-27 13:06:08 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-06-27 13:06:08 -0600 |
| commit | c87d86d6e32d58070756883e4e0381d66b9fa1ab (patch) | |
| tree | 96d2d3c88c4f4442e54dd102d61c742010ec2e16 /tests | |
| parent | f59c24589af439e0e22f43a2e42595cf88973ccf (diff) | |
test: replace hardcoded path with relative path
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/common/factory_bot.rs | 6 | ||||
| -rw-r--r-- | tests/integration_tests.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/common/factory_bot.rs b/tests/common/factory_bot.rs index 3c3810a7..6e45a01a 100644 --- a/tests/common/factory_bot.rs +++ b/tests/common/factory_bot.rs @@ -39,7 +39,7 @@ pub fn create_token() -> String { } pub fn build_cedar_authorizer() -> authzd::CedarAuthorizer { - authzd::CedarAuthorizer::new_from( - "/home/mokhax/src/gitlab.com/gitlab-org/software-supply-chain-security/authorization/authzd/etc/authzd", - ) + let realpath = std::fs::canonicalize("./etc/authzd").unwrap(); + let path = realpath.as_path(); + authzd::CedarAuthorizer::new_from(path) } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 63aaaadc..6e181f26 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -1,4 +1,4 @@ -use authzd::{CedarAuthorizer, CheckService}; +use authzd::CheckService; use common::*; use envoy_types::ext_authz::v3::pb::Authorization; use envoy_types::pb::envoy::service::auth::v3::attribute_context::HttpRequest; |
