Skip to content

Commit

Permalink
test: reinstate some unit test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed <ahmedtadde@gmail.com>
  • Loading branch information
ahmedtadde committed Nov 22, 2023
1 parent 263cc9a commit 66dbeee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/wash-cli/src/common/registry_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ mod tests {

let pull_basic: Cmd = Parser::try_parse_from(["reg", "pull", ECHO_WASM]).unwrap();
let pull_all_flags: Cmd =
Parser::try_parse_from(["reg", "pull", "--allow-latest", "--insecure"]).unwrap();
Parser::try_parse_from(["reg", "pull", ECHO_WASM, "--allow-latest", "--insecure"])
.unwrap();
let pull_all_options: Cmd = Parser::try_parse_from([
"reg",
"pull",
Expand Down Expand Up @@ -329,7 +330,7 @@ mod tests {
opts,
..
}) => {
assert_eq!(url, None);
assert_eq!(url, Some(ECHO_WASM.to_string()));
assert!(allow_latest);
assert!(opts.insecure);
}
Expand Down Expand Up @@ -391,9 +392,11 @@ mod tests {
};

// Push logging.par.gz and pull from local registry
let logging_push_all_flags = format!("{LOCAL_REGISTRY}/logging:allflags");
let push_all_flags: Cmd = Parser::try_parse_from([
"reg",
"push",
&logging_push_all_flags,
"--artifact",
&format!("{TESTDIR}/logging.par.gz"),
"--insecure",
Expand All @@ -409,7 +412,7 @@ mod tests {
allow_latest,
..
}) => {
assert_eq!(url, None);
assert_eq!(url, Some(logging_push_all_flags));
assert_eq!(artifact, format!("{TESTDIR}/logging.par.gz"));
assert!(opts.insecure);
assert!(allow_latest);
Expand Down

0 comments on commit 66dbeee

Please sign in to comment.