in src/common/commands_parser.rs [775:804]
fn test_parse_enclave_cid_correct() {
let app = create_app!();
let args = vec![
"nitro-cli",
"run-enclave",
"--memory",
"256",
"--cpu-count",
"2",
"--eif-path",
"non_existing_eif.eif",
"--enclave-cid",
"10",
];
let matches = app.try_get_matches_from(args);
assert!(matches.is_ok());
let result = parse_enclave_cid(
matches
.as_ref()
.unwrap()
.subcommand_matches("run-enclave")
.unwrap(),
);
assert!(result.is_ok());
if let Some(parsed_cid) = result.unwrap() {
assert_eq!(parsed_cid, 10);
}
}