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:43 UTC

[incubator-openwhisk-cli] branch master updated (d29bd3c -> 515d0dd)

This is an automated email from the ASF dual-hosted git repository.

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


    from d29bd3c  Clean up all the Travis environment
     new 6fffec7  Better error controller message for authorization failure (#2877)
     new 515d0dd  Enable v2 views. (#2762)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 tests/src/test/scala/system/basic/WskBasicTests.scala   |  5 ++++-
 tests/src/test/scala/system/basic/WskConsoleTests.scala | 13 ++++++-------
 tests/src/test/scala/system/basic/WskRuleTests.scala    |  4 ++--
 3 files changed, 12 insertions(+), 10 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].

[incubator-openwhisk-cli] 01/02: Better error controller message for authorization failure (#2877)

Posted by ho...@apache.org.
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>.

[incubator-openwhisk-cli] 02/02: Enable v2 views. (#2762)

Posted by ho...@apache.org.
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 515d0dd3f069514310ab0ffbb428d13951fc0247
Author: rodric rabbah <ro...@gmail.com>
AuthorDate: Fri Nov 17 02:34:57 2017 -0500

    Enable v2 views. (#2762)
    
    * Enable v2 views.
    
    * Adjust console test in REST client eventhough this test makes no sense to me here.
---
 tests/src/test/scala/system/basic/WskConsoleTests.scala | 13 ++++++-------
 tests/src/test/scala/system/basic/WskRuleTests.scala    |  4 ++--
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/tests/src/test/scala/system/basic/WskConsoleTests.scala b/tests/src/test/scala/system/basic/WskConsoleTests.scala
index 80aae4d..c513eec 100644
--- a/tests/src/test/scala/system/basic/WskConsoleTests.scala
+++ b/tests/src/test/scala/system/basic/WskConsoleTests.scala
@@ -74,9 +74,10 @@ abstract class WskConsoleTests extends TestHelpers with WskTestHelpers {
       // Time recorded by invoker, some contingency to make query more robust
       val queryTime = activation.start.minusMillis(500)
       // since: poll for activations since specified point in time (absolute)
-      val activations = wsk.activation.pollFor(N = 1, Some(actionName), since = Some(queryTime), retries = 80).length
+      val activations =
+        wsk.activation.pollFor(N = 1, Some(s"$packageName/$actionName"), since = Some(queryTime), retries = 80).length
       withClue(
-        s"expected activations of action '${actionName}' since ${queryTime.toString} / initial activation ${activation.activationId}:") {
+        s"expected activations of action '$fullActionName' since $queryTime, initial activation ${activation.activationId}:") {
         activations should be(1)
       }
 
@@ -84,8 +85,7 @@ abstract class WskConsoleTests extends TestHelpers with WskTestHelpers {
       val pollTime = 10 seconds
       // since: poll for activations since specified number of seconds ago (relative)
       val console = wsk.activation.console(pollTime, since = Some(duration))
-      withClue(
-        s"Poll for ${pollTime.toSeconds} seconds since ${duration.toSeconds} seconds did not return expected result:") {
+      withClue(s"Polled since ${duration.toSeconds} seconds, did not find expected result:") {
         console.stdout should include(payload)
       }
     }
@@ -108,15 +108,14 @@ abstract class WskConsoleTests extends TestHelpers with WskTestHelpers {
       // since: poll for activations since specified point in time (absolute)
       val activations = wsk.activation.pollFor(N = 4, Some(name), since = Some(queryTime), retries = 80).length
       withClue(
-        s"expected activations of action '${name}' since ${queryTime.toString} / initial activation ${activation.activationId}:") {
+        s"expected activations of action '$name' since $queryTime, initial activation ${activation.activationId}:") {
         activations should be(count + 1)
       }
       val duration = Duration(Instant.now.minusMillis(start.toEpochMilli).toEpochMilli, MILLISECONDS)
       val pollTime = 10 seconds
       // since: poll for activations since specified number of seconds ago (relative)
       val console = wsk.activation.console(pollTime, since = Some(duration))
-      withClue(
-        s"Poll for ${pollTime.toSeconds} seconds since ${duration.toSeconds} seconds did not return expected result:") {
+      withClue(s"Polled for ${duration.toSeconds} seconds, did not find expected result:") {
         console.stdout should include("Happy New Year")
       }
     }
diff --git a/tests/src/test/scala/system/basic/WskRuleTests.scala b/tests/src/test/scala/system/basic/WskRuleTests.scala
index a7929ba..89f0a21 100644
--- a/tests/src/test/scala/system/basic/WskRuleTests.scala
+++ b/tests/src/test/scala/system/basic/WskRuleTests.scala
@@ -147,7 +147,7 @@ abstract class WskRuleTests extends TestHelpers with WskTestHelpers {
 
       withActivationsFromEntity(
         wsk.activation,
-        actionName,
+        pkgActionName,
         since = Some(triggerActivation.start.minusMillis(activationTimeSkewFactorMs))) {
         _.head.response.result shouldBe Some(testResult)
       }
@@ -187,7 +187,7 @@ abstract class WskRuleTests extends TestHelpers with WskTestHelpers {
 
       withActivationsFromEntity(
         wsk.activation,
-        actionName,
+        pkgActionName,
         since = Some(triggerActivation.start.minusMillis(activationTimeSkewFactorMs))) {
         _.head.response.result shouldBe Some(testResult)
       }

-- 
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>.