openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdeu...@apache.org
Subject [incubator-openwhisk-cli] branch master updated: allow namespace invalid arg message to be overridden (#369)
Date Fri, 14 Sep 2018 16:54:52 GMT
This is an automated email from the ASF dual-hosted git repository.

mdeuser pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new bb1b635  allow namespace invalid arg message to be overridden (#369)
bb1b635 is described below

commit bb1b635305a9624bc716093e35e707a94d79dea1
Author: David Cariello <drcariel@us.ibm.com>
AuthorDate: Fri Sep 14 11:54:48 2018 -0500

    allow namespace invalid arg message to be overridden (#369)
---
 tests/src/test/scala/system/basic/WskCliBasicTests.scala             | 1 -
 tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/src/test/scala/system/basic/WskCliBasicTests.scala b/tests/src/test/scala/system/basic/WskCliBasicTests.scala
index db617a6..4b91d3b 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 4e893dd..38c68e8 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),


Mime
View raw message