Skip to content

Commit

Permalink
Fixup existing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
  • Loading branch information
bleggett committed Sep 3, 2024
1 parent 952df6e commit 31945eb
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions spire-api/tests/delegated_identity_api_client_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mod integration_tests_delegate_identity_api_client {
use once_cell::sync::Lazy;
use spiffe::bundle::BundleRefSource;
use spiffe::{JwtBundleSet, TrustDomain};
use spire_api::{selectors, DelegatedIdentityClient};
use spire_api::{selectors, DelegateAttestationRequest, DelegatedIdentityClient};
use std::process::Command;
use tokio_stream::StreamExt;

Expand Down Expand Up @@ -38,9 +38,9 @@ mod integration_tests_delegate_identity_api_client {
let svid = client
.fetch_jwt_svids(
&["my_audience"],
vec![selectors::Selector::Unix(selectors::Unix::Uid(
DelegateAttestationRequest::Selectors(vec![selectors::Selector::Unix(selectors::Unix::Uid(
get_uid() + 1,
))],
))]),
)
.await
.expect("Failed to fetch JWT SVID");
Expand All @@ -52,9 +52,10 @@ mod integration_tests_delegate_identity_api_client {
async fn fetch_delegate_x509_svid() {
let mut client = get_client().await;
let response: spiffe::svid::x509::X509Svid = client
.fetch_x509_svid(vec![selectors::Selector::Unix(selectors::Unix::Uid(
.fetch_x509_svid(
DelegateAttestationRequest::Selectors(vec![selectors::Selector::Unix(selectors::Unix::Uid(
get_uid() + 1,
))])
))]))
.await
.expect("Failed to fetch delegate SVID");
// Not checking the chain as the root is generated by spire.
Expand All @@ -71,9 +72,10 @@ mod integration_tests_delegate_identity_api_client {
let test_duration = std::time::Duration::from_secs(60);
let mut client = get_client().await;
let mut stream = client
.stream_x509_svids(vec![selectors::Selector::Unix(selectors::Unix::Uid(
.stream_x509_svids(
DelegateAttestationRequest::Selectors(vec![selectors::Selector::Unix(selectors::Unix::Uid(
get_uid() + 1,
))])
))]))
.await
.expect("Failed to fetch delegate SVID");

Expand Down Expand Up @@ -124,9 +126,9 @@ mod integration_tests_delegate_identity_api_client {
let svids = client
.fetch_jwt_svids(
&["my_audience"],
vec![selectors::Selector::Unix(selectors::Unix::Uid(
DelegateAttestationRequest::Selectors(vec![selectors::Selector::Unix(selectors::Unix::Uid(
get_uid() + 1,
))],
))]),
)
.await
.expect("Failed to fetch JWT SVID");
Expand Down

0 comments on commit 31945eb

Please sign in to comment.