Skip to content

Commit

Permalink
allow namespace invalid arg message to be overridden (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cariello authored and mdeuser committed Sep 14, 2018
1 parent 2f251d1 commit bb1b635
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion tests/src/test/scala/system/basic/WskCliBasicTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class WskCliBasicTests extends TestHelpers with WskTestHelpers {
it should "reject unauthenticated access" in {
implicit val wskprops = WskProps("xxx") // shadow properties
val errormsg = "The supplied authentication is invalid"
wsk.namespace.list(expectedExitCode = UNAUTHORIZED).stderr should include(errormsg)
wsk.namespace.get(expectedExitCode = UNAUTHORIZED).stderr should include(errormsg)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
val wsk = new Wsk
val defaultAction = Some(TestUtils.getTestActionFilename("hello.js"))
val usrAgentHeaderRegEx = """\bUser-Agent\b": \[\s+"OpenWhisk\-CLI/1.\d+.*"""
val namespaceInvalidArgumentErrMsg = "error: Invalid argument(s): invalidArg. No arguments are required."
// certain environments may return router IP address instead of api_host string causing a failure
// Set apiHostCheck to false to avoid apihost check
val apiHostCheck = true
Expand Down Expand Up @@ -1969,7 +1970,7 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
(Seq("activation", "result", "activationID", invalidArg), s"${tooManyArgsMsg}${invalidArg}."),
(Seq("activation", "poll", "activationID", invalidArg), s"${tooManyArgsMsg}${invalidArg}. ${optNamespaceMsg}"),
(Seq("namespace", "list", invalidArg), s"${tooManyArgsMsg}${invalidArg}. ${noArgsReqMsg}"),
(Seq("namespace", "get", invalidArg), s"${tooManyArgsMsg}${invalidArg}. ${noArgsReqMsg}"),
(Seq("namespace", "get", invalidArg), s"${namespaceInvalidArgumentErrMsg}"),
(Seq("package", "create"), s"${tooFewArgsMsg} ${packageNameReqMsg}"),
(Seq("package", "create", "packageName", invalidArg), s"${tooManyArgsMsg}${invalidArg}."),
(Seq("package", "create", "packageName", "--shared", invalidArg), invalidShared),
Expand Down

0 comments on commit bb1b635

Please sign in to comment.