14
14
15
15
use crate :: Result ;
16
16
use gax:: retry_policy:: { AlwaysRetry , RetryPolicyExt } ;
17
+ use storage:: client:: StorageControl ;
17
18
18
- pub async fn error_details_http (
19
- builder : ta:: builder:: telco_automation:: ClientBuilder ,
20
- ) -> Result < ( ) > {
19
+ pub async fn error_details_http ( ) -> Result < ( ) > {
21
20
// Enable a basic subscriber. Useful to troubleshoot problems and visually
22
21
// verify tracing is doing something.
23
22
#[ cfg( feature = "log-integration-tests" ) ]
@@ -34,7 +33,8 @@ pub async fn error_details_http(
34
33
35
34
let project_id = crate :: project_id ( ) ?;
36
35
let region_id = crate :: region_id ( ) ;
37
- let client = builder
36
+ let client = ta:: client:: TelcoAutomation :: builder ( )
37
+ . with_tracing ( )
38
38
. with_retry_policy ( AlwaysRetry . with_attempt_limit ( 2 ) )
39
39
. build ( )
40
40
. await ?;
@@ -54,9 +54,7 @@ pub async fn error_details_http(
54
54
Ok ( ( ) )
55
55
}
56
56
57
- pub async fn error_details_grpc (
58
- builder : storage:: builder:: storage_control:: ClientBuilder ,
59
- ) -> Result < ( ) > {
57
+ pub async fn error_details_grpc ( ) -> Result < ( ) > {
60
58
#[ cfg( feature = "log-integration-tests" ) ]
61
59
let _guard = {
62
60
use tracing_subscriber:: fmt:: format:: FmtSpan ;
@@ -69,7 +67,7 @@ pub async fn error_details_grpc(
69
67
tracing:: subscriber:: set_default ( subscriber)
70
68
} ;
71
69
72
- let client = builder. build ( ) . await ?;
70
+ let client = StorageControl :: builder ( ) . with_tracing ( ) . build ( ) . await ?;
73
71
let err = client
74
72
. get_bucket ( )
75
73
. set_name ( "malformed/_/bucket/name" )
@@ -84,7 +82,7 @@ pub async fn error_details_grpc(
84
82
Ok ( ( ) )
85
83
}
86
84
87
- pub async fn check_code_for_http ( builder : wf :: builder :: workflows :: ClientBuilder ) -> Result < ( ) > {
85
+ pub async fn check_code_for_http ( ) -> Result < ( ) > {
88
86
#[ cfg( feature = "log-integration-tests" ) ]
89
87
let _guard = {
90
88
use tracing_subscriber:: fmt:: format:: FmtSpan ;
@@ -102,7 +100,10 @@ pub async fn check_code_for_http(builder: wf::builder::workflows::ClientBuilder)
102
100
let workflow_id = crate :: random_workflow_id ( ) ;
103
101
let workflow_name =
104
102
format ! ( "projects/{project_id}/locations/{location_id}/workflows/{workflow_id}" ) ;
105
- let client = builder. build ( ) . await ?;
103
+ let client = wf:: client:: Workflows :: builder ( )
104
+ . with_tracing ( )
105
+ . build ( )
106
+ . await ?;
106
107
107
108
match client. get_workflow ( ) . set_name ( & workflow_name) . send ( ) . await {
108
109
Ok ( g) => panic ! ( "unexpected success {g:?}" ) ,
@@ -119,9 +120,7 @@ pub async fn check_code_for_http(builder: wf::builder::workflows::ClientBuilder)
119
120
Ok ( ( ) )
120
121
}
121
122
122
- pub async fn check_code_for_grpc (
123
- builder : storage:: builder:: storage_control:: ClientBuilder ,
124
- ) -> Result < ( ) > {
123
+ pub async fn check_code_for_grpc ( ) -> Result < ( ) > {
125
124
#[ cfg( feature = "log-integration-tests" ) ]
126
125
let _guard = {
127
126
use tracing_subscriber:: fmt:: format:: FmtSpan ;
@@ -136,7 +135,7 @@ pub async fn check_code_for_grpc(
136
135
137
136
let bucket_id = crate :: random_bucket_id ( ) ;
138
137
let bucket_name = format ! ( "projects/_/buckets/{bucket_id}" ) ;
139
- let client = builder. build ( ) . await ?;
138
+ let client = StorageControl :: builder ( ) . with_tracing ( ) . build ( ) . await ?;
140
139
141
140
match client. get_bucket ( ) . set_name ( & bucket_name) . send ( ) . await {
142
141
Ok ( g) => panic ! ( "unexpected success {g:?}" ) ,
0 commit comments