in src/common/commands_parser.rs [1091:1119]
fn test_parse_cpu_ids_str() {
let app = create_app!();
let args = vec![
"nitro-cli",
"run-enclave",
"--cpu-ids",
"1",
"three",
"--eif-path",
"non_existing_eif.eif",
"--memory",
"64",
];
let matches = app.try_get_matches_from(args);
assert!(matches.is_ok());
let result = parse_cpu_ids(
matches
.as_ref()
.unwrap()
.subcommand_matches("run-enclave")
.unwrap(),
);
assert!(result.is_err());
if let Err(err_info) = result {
let err_str = construct_error_message(&err_info);
assert!(err_str.contains("Invalid argument provided"));
}
}