You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ho...@apache.org on 2017/11/20 16:43:44 UTC
[incubator-openwhisk-cli] 01/02: Better error controller message
for authorization failure (#2877)
This is an automated email from the ASF dual-hosted git repository.
houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git
commit 6fffec710665ce827d18a0415a0f72d5dc4680ca
Author: Mark Deuser <md...@us.ibm.com>
AuthorDate: Wed Nov 15 15:31:30 2017 -0500
Better error controller message for authorization failure (#2877)
* Add resource name to Forbidden error message
* Comment updates and test case updates
* Fix scalafmt issue
* Reformat using scalafmt plugin
* Fix two more failing test cases
* Comment updates
* Compiles but tests are broken
* Add Set[Resources] test
* Comment updates
* Comment updates
---
tests/src/test/scala/system/basic/WskBasicTests.scala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/src/test/scala/system/basic/WskBasicTests.scala b/tests/src/test/scala/system/basic/WskBasicTests.scala
index 9a02bdb..1142414 100644
--- a/tests/src/test/scala/system/basic/WskBasicTests.scala
+++ b/tests/src/test/scala/system/basic/WskBasicTests.scala
@@ -36,6 +36,8 @@ import spray.json._
import spray.json.DefaultJsonProtocol._
import spray.json.pimpAny
+import whisk.http.Messages
+
@RunWith(classOf[JUnitRunner])
class WskBasicTests extends TestHelpers with WskTestHelpers {
@@ -168,8 +170,9 @@ class WskBasicTests extends TestHelpers with WskTestHelpers {
it should "reject get of package that does not exist" in {
val name = "nonexistentPackage"
+ val ns = wsk.namespace.whois()
val stderr = wsk.pkg.get(name, expectedExitCode = NOT_FOUND).stderr
- stderr should include regex (s"""Unable to get package '$name': The requested resource does not exist. \\(code \\d+\\)""")
+ stderr should include regex (s"""Unable to get package '$name': ${Messages.resourceDoesntExist(s"${ns}/${name}")} \\(code \\d+\\)""")
}
behavior of "Wsk Action CLI"
--
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>.