@@ -8,14 +8,17 @@ mod tests {
88 use std:: process:: Command ;
99
1010 use anyhow:: Error ;
11+ use hyper_util:: client:: legacy:: Client as HTTPClient ;
12+ use hyper_util:: rt:: TokioExecutor ;
1113 use k8s_openapi:: apimachinery:: pkg:: apis:: meta:: v1:: { Condition , Time } ;
1214 use k8s_openapi:: chrono:: Utc ;
1315 use kube:: api:: { Patch , PatchParams , PostParams } ;
14- use kube:: client:: ConfigExt ;
1516 use kube:: config:: { KubeConfigOptions , Kubeconfig } ;
1617 use kube:: core:: ObjectMeta ;
17- use kube:: { Api , Config , CustomResourceExt } ;
18+ use kube:: Client as KubeClient ;
19+ use kube:: { client:: ConfigExt , Api , Config , CustomResourceExt } ;
1820 use serde_json:: json;
21+ use tower:: BoxError ;
1922 use tower:: ServiceBuilder ;
2023 use uuid:: Uuid ;
2124
@@ -147,12 +150,15 @@ mod tests {
147150 let config =
148151 Config :: from_custom_kubeconfig ( kubeconfig, & KubeConfigOptions :: default ( ) ) . await ?;
149152
153+ let https = config. rustls_https_connector ( ) ?;
154+ let http_client = HTTPClient :: builder ( TokioExecutor :: new ( ) ) . build ( https) ;
150155 let service = ServiceBuilder :: new ( )
151156 . layer ( config. base_uri_layer ( ) )
152157 . option_layer ( config. auth_layer ( ) ?)
153- . service ( hyper:: Client :: builder ( ) . build ( config. rustls_https_connector ( ) ?) ) ;
158+ . map_err ( BoxError :: from)
159+ . service ( http_client) ;
154160
155- let client = kube :: Client :: new ( service, config. default_namespace ) ;
161+ let client = KubeClient :: new ( service, config. default_namespace ) ;
156162
157163 deploy_crds ( client. clone ( ) ) . await ?;
158164
0 commit comments