File tree Expand file tree Collapse file tree
cmd/crates/soroban-test/tests/it Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use soroban_cli:: tx:: ONE_XLM ;
22use soroban_test:: { AssertExt , TestEnv } ;
3+ use predicates:: prelude:: predicate;
34
45pub fn test_address ( sandbox : & TestEnv ) -> String {
56 sandbox
@@ -102,3 +103,20 @@ async fn create_account() {
102103 let new_account = client. get_account ( & new_address) . await . unwrap ( ) ;
103104 assert_eq ! ( new_account. balance, starting_balance) ;
104105}
106+
107+ #[ tokio:: test]
108+ async fn get_secret_key ( ) {
109+ let sandbox = & TestEnv :: new ( ) ;
110+ sandbox
111+ . new_assert_cmd ( "keys" )
112+ . args ( [ "generate" , "test2" , "--secure-store" ] )
113+ . assert ( )
114+ . success ( ) ;
115+ sandbox
116+ . new_assert_cmd ( "keys" )
117+ . arg ( "secret" )
118+ . arg ( "test2" )
119+ . assert ( )
120+ . stderr ( predicate:: str:: contains ( "does not reveal secret key" ) )
121+ . failure ( ) ;
122+ }
You can’t perform that action at this time.
0 commit comments