summaryrefslogtreecommitdiff
path: root/tests/authorization/server_test.rs
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-14 14:39:05 -0600
committermo khan <mo@mokhan.ca>2025-07-14 14:39:05 -0600
commit73e7880ca39983a386955b783e1a73fd947b2534 (patch)
tree9a06a45c9b18d7a148e72efb65a882afd25cb36b /tests/authorization/server_test.rs
parentdebf8403c595c98213bf17913824b081262c15e2 (diff)
test: update integration test to test ext_authz service
Diffstat (limited to 'tests/authorization/server_test.rs')
-rw-r--r--tests/authorization/server_test.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/authorization/server_test.rs b/tests/authorization/server_test.rs
index fe8c8a73..5a92dcff 100644
--- a/tests/authorization/server_test.rs
+++ b/tests/authorization/server_test.rs
@@ -27,21 +27,19 @@ mod tests {
}
#[tokio::test]
- async fn test_health_check_service() {
+ async fn test_health_ext_authz_service() {
let (addr, server) = start_server().await;
- let mut client =
- build_rpc_client(addr, tonic_health::pb::health_client::HealthClient::new).await;
- let request = tonic::Request::new(tonic_health::pb::HealthCheckRequest {
- service: String::new(),
- });
+ let mut client = build_rpc_client(
+ addr,
+ envoy_types::pb::envoy::service::auth::v3::authorization_client::AuthorizationClient::new,
+ )
+ .await;
+
+ let request = tonic::Request::new(envoy_types::ext_authz::v3::pb::CheckRequest::default());
let response = client.check(request).await;
assert!(response.is_ok());
- assert_eq!(
- response.unwrap().into_inner().status(),
- tonic_health::pb::health_check_response::ServingStatus::Serving
- );
server.abort();
}