@@ -18,7 +18,7 @@ use tokio::io;
1818
1919use crate :: {
2020 bundle:: { ApplicationBundleReference , LibraryBundleReference } ,
21- cli:: model:: LocalFileReference ,
21+ cli:: model:: { BatchIsolation , LocalFileReference } ,
2222 errors:: { ApiError , EnvArgError , InputError } ,
2323 filtering:: model:: SparseMarathonfile ,
2424 pull:: PullFileConfig ,
@@ -63,6 +63,7 @@ pub trait RapiClient {
6363 application_bundle : Option < Vec < ApplicationBundleReference > > ,
6464 library_bundle : Option < Vec < LibraryBundleReference > > ,
6565 granted_permission : Option < Vec < String > > ,
66+ batch_isolation : Option < BatchIsolation > ,
6667 ) -> Result < String > ;
6768 async fn get_run ( & self , id : & str ) -> Result < TestRun > ;
6869
@@ -162,6 +163,7 @@ impl RapiClient for RapiReqwestClient {
162163 application_bundle : Option < Vec < ApplicationBundleReference > > ,
163164 library_bundle : Option < Vec < LibraryBundleReference > > ,
164165 granted_permission : Option < Vec < String > > ,
166+ batch_isolation : Option < BatchIsolation > ,
165167 ) -> Result < String > {
166168 let url = format ! ( "{}/v2/run" , self . base_url) ;
167169 let params = [ ( "api_key" , self . api_key . clone ( ) ) ] ;
@@ -258,6 +260,8 @@ impl RapiClient for RapiReqwestClient {
258260 let env_args_map = vec_to_hashmap ( env_args) ?;
259261 let test_env_args_map = vec_to_hashmap ( test_env_args) ?;
260262
263+ let app_uninstall = batch_isolation. map ( |x| x == BatchIsolation :: UninstallApp ) ;
264+
261265 let create_request = CreateRunRequest {
262266 s3_test_app_path : s3_test_app_path. clone ( ) ,
263267 test_app_md5 : test_app. clone ( ) . map ( |s| s. md5 ) ,
@@ -294,6 +298,7 @@ impl RapiClient for RapiReqwestClient {
294298 test_env_args : test_env_args_map,
295299 bundles,
296300 granted_permission : granted_permission. clone ( ) ,
301+ app_uninstall,
297302 } ;
298303
299304 let response = self . client . post ( url) . json ( & create_request) . send ( ) . await ?;
@@ -675,6 +680,8 @@ struct CreateRunRequest {
675680 bundles : Option < Vec < CreateRunBundle > > ,
676681 #[ serde( rename = "granted_permission" , default ) ]
677682 granted_permission : Option < Vec < String > > ,
683+ #[ serde( rename = "app_uninstall" , default ) ]
684+ app_uninstall : Option < bool > ,
678685}
679686
680687#[ derive( Serialize , Deserialize , Debug ) ]
0 commit comments