5
5
use crate :: testing:: TestResult ;
6
6
use anyhow:: anyhow;
7
7
use async_trait:: async_trait;
8
+ use base64:: { engine:: general_purpose:: STANDARD_NO_PAD , engine:: Engine } ;
8
9
use futures:: future:: BoxFuture ;
9
10
use nkeys:: { KeyPair , KeyPairType } ;
10
11
use serde:: Serialize ;
@@ -20,6 +21,7 @@ use std::{
20
21
use tokio:: sync:: OnceCell ;
21
22
use toml:: value:: Value as TomlValue ;
22
23
use wasmbus_rpc:: {
24
+ async_nats,
23
25
common:: { Context , Message , SendOpts , Transport } ,
24
26
core:: { HealthCheckRequest , HealthCheckResponse , HostData , LinkDefinition , WasmCloudEntity } ,
25
27
error:: { RpcError , RpcResult } ,
@@ -59,7 +61,7 @@ fn to_value_map(data: &toml::map::Map<String, TomlValue>) -> RpcResult<SimpleVal
59
61
// copy the entire map as base64-encoded json with value "config_b64"
60
62
let json = serde_json:: to_string ( data)
61
63
. map_err ( |e| RpcError :: Ser ( format ! ( "invalid 'values' map: {}" , e) ) ) ?;
62
- let b64 = base64 :: encode_config ( json, base64 :: STANDARD_NO_PAD ) ;
64
+ let b64 = STANDARD_NO_PAD . encode ( json) ;
63
65
map. insert ( "config_b64" . to_string ( ) , b64) ;
64
66
Ok ( map)
65
67
}
@@ -352,7 +354,7 @@ pub async fn start_provider_test(
352
354
host_data. structured_logging = false ;
353
355
354
356
let buf = serde_json:: to_vec ( & host_data) . map_err ( |e| RpcError :: Ser ( e. to_string ( ) ) ) ?;
355
- let mut encoded = base64 :: encode_config ( & buf, base64 :: STANDARD_NO_PAD ) ;
357
+ let mut encoded = STANDARD_NO_PAD . encode ( & buf) ;
356
358
encoded. push_str ( "\r \n " ) ;
357
359
358
360
// provider's stdout is piped through our stdout
0 commit comments