Skip to content

Commit bb1b635

Browse files
David Cariellomdeuser
David Cariello
authored andcommitted
allow namespace invalid arg message to be overridden (#369)
1 parent 2f251d1 commit bb1b635

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/src/test/scala/system/basic/WskCliBasicTests.scala

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ class WskCliBasicTests extends TestHelpers with WskTestHelpers {
6767
it should "reject unauthenticated access" in {
6868
implicit val wskprops = WskProps("xxx") // shadow properties
6969
val errormsg = "The supplied authentication is invalid"
70-
wsk.namespace.list(expectedExitCode = UNAUTHORIZED).stderr should include(errormsg)
7170
wsk.namespace.get(expectedExitCode = UNAUTHORIZED).stderr should include(errormsg)
7271
}
7372

tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala

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

0 commit comments

Comments
 (0)