From 66dbeee8c85185de4bc9b770226d20443e613e05 Mon Sep 17 00:00:00 2001 From: Ahmed Date: Wed, 22 Nov 2023 10:32:28 -0500 Subject: [PATCH] test: reinstate some unit test cases Signed-off-by: Ahmed --- crates/wash-cli/src/common/registry_cmd.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/wash-cli/src/common/registry_cmd.rs b/crates/wash-cli/src/common/registry_cmd.rs index f3e6d6a7c4..b88893e720 100644 --- a/crates/wash-cli/src/common/registry_cmd.rs +++ b/crates/wash-cli/src/common/registry_cmd.rs @@ -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", @@ -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); } @@ -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", @@ -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);