.unwrap() in tests instead of assert!()ing .is_ok() for a better failure message

This commit is contained in:
Michael Vines
2019-01-28 14:52:35 -08:00
parent 53afa64634
commit bfaf5634a1
19 changed files with 36 additions and 62 deletions

View File

@ -30,13 +30,11 @@ fn test_wallet_deploy_program() {
config.drone_port = drone_addr.port();
config.rpc_port = leader_data.rpc.port();
config.command = WalletCommand::Airdrop(50);
let response = process_command(&config);
assert!(response.is_ok());
process_command(&config).unwrap();
config.command = WalletCommand::Deploy(pathbuf.to_str().unwrap().to_string());
let response = process_command(&config);
assert!(response.is_ok());
let json: Value = serde_json::from_str(&response.unwrap()).unwrap();
let program_id_str = json
.as_object()