@@ -729,64 +729,6 @@ mod tests {
729729 Ok ( ( ) )
730730 }
731731
732- #[ tokio:: test]
733- async fn open_object_url_template ( ) -> anyhow:: Result < ( ) > {
734- use gaxi:: grpc:: tonic:: Status as TonicStatus ;
735- use google_cloud_gax:: error:: rpc:: Code ;
736- use storage_grpc_mock:: { MockStorage , start} ;
737-
738- let guard = TestLayer :: initialize ( ) ;
739-
740- let mut mock = MockStorage :: new ( ) ;
741- mock. expect_bidi_read_object ( )
742- . return_once ( |_| Err ( TonicStatus :: not_found ( "not here" ) ) ) ;
743- let ( endpoint, _server) = start ( "0.0.0.0:0" , mock) . await ?;
744-
745- let client = crate :: client:: Storage :: builder ( )
746- . with_credentials ( Anonymous :: new ( ) . build ( ) )
747- . with_endpoint ( endpoint)
748- . with_tracing ( )
749- . build ( )
750- . await ?;
751- let response = client
752- . open_object ( "projects/_/buckets/test-bucket" , "test-object" )
753- . send ( )
754- . await ;
755- assert ! (
756- matches!( response, Err ( ref e) if e. status( ) . is_some_and( |s| s. code == Code :: NotFound ) ) ,
757- "{response:?}"
758- ) ;
759-
760- let captured = TestLayer :: capture ( & guard) ;
761- check_debug_log ( & captured, "open_object" ) ;
762- client_request_span ( & captured, "open_object" , "NOT_FOUND" , "grpc" ) ;
763-
764- let span = captured
765- . iter ( )
766- . find ( |s| s. name == "client_request" )
767- . unwrap_or_else ( || panic ! ( "missing `client_request` span in capture: {captured:#?}" ) ) ;
768- assert_eq ! (
769- span. attributes. get( "rpc.method" ) ,
770- Some ( & AttributeValue :: from(
771- "google.storage.v2.Storage/BidiStreamingRead"
772- ) )
773- ) ;
774- assert_eq ! (
775- span. attributes. get( "gcp.resource.destination.id" ) ,
776- Some ( & AttributeValue :: from(
777- "//storage.googleapis.com/projects/_/buckets/test-bucket"
778- ) )
779- ) ;
780-
781- // Note: As defined by Google Cloud Client Observability and `gax-internal`,
782- // `url.template` is recorded in `DurationMetric` and `WithClientLogging` rather than
783- // on the `client_request` (T3) span itself. Verifying the span confirms telemetry is
784- // captured and that `on_client_request` was invoked.
785- assert_eq ! ( span. attributes. get( "url.template" ) , None ) ;
786-
787- Ok ( ( ) )
788- }
789-
790732 #[ tokio:: test]
791733 #[ ignore = "flaky test, see #5290" ]
792734 async fn open_object_success ( ) -> anyhow:: Result < ( ) > {
0 commit comments