mdeuser closed pull request #369: allow namespace invalid arg message to be 
overridden
URL: https://github.com/apache/incubator-openwhisk-cli/pull/369
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/src/test/scala/system/basic/WskCliBasicTests.scala 
b/tests/src/test/scala/system/basic/WskCliBasicTests.scala
index db617a63..4b91d3ba 100644
--- a/tests/src/test/scala/system/basic/WskCliBasicTests.scala
+++ b/tests/src/test/scala/system/basic/WskCliBasicTests.scala
@@ -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)
   }
 
diff --git 
a/tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala 
b/tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala
index 4e893dda..38c68e87 100644
--- a/tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala
@@ -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
@@ -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),


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to