alamb commented on code in PR #535:
URL:
https://github.com/apache/arrow-rs-object-store/pull/535#discussion_r2560052929
##########
src/gcp/mod.rs:
##########
@@ -450,4 +450,31 @@ mod test {
err
)
}
+
+ #[tokio::test]
+ async fn gcs_test_external_account_authorized_user_integration() {
+ maybe_skip_integration!();
+
+ // This test verifies that external_account_authorized_user credentials
Review Comment:
I don't understand how this test is verifying
`external_account_authorized_user` -- it doesn't seem to configure such
credentials 🤔
##########
src/gcp/builder.rs:
##########
@@ -746,4 +764,84 @@ mod tests {
panic!("{key} not propagated as ClientConfigKey");
}
}
+
+ #[test]
+ fn gcs_test_external_account_authorized_user_credentials() {
+ // Create an external_account_authorized_user credential file
+ // This format is used by workforce identity federation
+ let mut creds_file = NamedTempFile::new().unwrap();
+ creds_file
+ .write_all(
+ br#"{
+ "type": "external_account_authorized_user",
+ "audience":
"//iam.googleapis.com/locations/global/workforcePools/test-pool/providers/test-provider",
+ "client_id": "test-client-id.apps.googleusercontent.com",
+ "client_secret": "test-client-secret",
+ "refresh_token": "test-refresh-token",
+ "token_url": "https://sts.googleapis.com/v1/oauthtoken",
+ "token_info_url": "https://sts.googleapis.com/v1/introspect",
+ "quota_project_id": "test-project"
+}"#,
+ )
+ .unwrap();
+
+ // Should successfully deserialize and create a builder
+ let result = GoogleCloudStorageBuilder::new()
+ .with_application_credentials(creds_file.path().to_str().unwrap())
+ .with_bucket_name("test-bucket")
+ .build();
+
+ // Build should succeed - the credentials are valid format
+ assert!(
+ result.is_ok(),
+ "Build should succeed with external_account_authorized_user
credentials: {:?}",
+ result.err()
+ );
+ }
+
+ #[test]
+ #[ignore] // Only run manually when testing with real ADC
+ fn gcs_test_real_external_account_authorized_user_adc() {
Review Comment:
this test seems more like an example -- I wonder if it would be better as an
example (or a no-run doc test)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]