You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/09/18 14:55:34 UTC
[incubator-openwhisk-cli] 06/16: Rename CliActivationResponse &
CliActivation, and change them from (#2592)
This is an automated email from the ASF dual-hosted git repository.
csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git
commit f48f7ea45fe76be126a0f3e747af35bb70422872
Author: Vincent <sh...@us.ibm.com>
AuthorDate: Wed Aug 23 10:09:05 2017 -0400
Rename CliActivationResponse & CliActivation, and change them from (#2592)
This PR renames the class CliActivation and CliActivationResponse
and makes them available to be accessed from another package, because
REST call can use both of the classes as well.
Partially-closes-bug: #2430
---
tests/src/test/scala/system/basic/WskActionTests.scala | 5 +++--
tests/src/test/scala/system/basic/WskBasicTests.scala | 3 ++-
tests/src/test/scala/system/basic/WskSequenceTests.scala | 5 +++--
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/tests/src/test/scala/system/basic/WskActionTests.scala b/tests/src/test/scala/system/basic/WskActionTests.scala
index 390b342..06778a3 100644
--- a/tests/src/test/scala/system/basic/WskActionTests.scala
+++ b/tests/src/test/scala/system/basic/WskActionTests.scala
@@ -20,6 +20,7 @@ package system.basic
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
+import common.ActivationResult
import common.JsHelpers
import common.TestHelpers
import common.TestCLIUtils
@@ -290,7 +291,7 @@ class WskActionTests
}
val run = wsk.action.invoke(name, Map("payload" -> testString.toJson), blocking = true)
- val activation = wsk.parseJsonString(run.stdout).convertTo[CliActivation]
+ val activation = wsk.parseJsonString(run.stdout).convertTo[ActivationResult]
withClue(s"check failed for activation: $activation") {
val wordCount = testString.split(" ").length
@@ -306,7 +307,7 @@ class WskActionTests
}
val run = wsk.action.invoke(name, Map("payload" -> testString.toJson), blocking = true)
- val activation = wsk.parseJsonString(run.stdout).convertTo[CliActivation]
+ val activation = wsk.parseJsonString(run.stdout).convertTo[ActivationResult]
withClue(s"check failed for activation: $activation") {
activation.response.status shouldBe "success"
diff --git a/tests/src/test/scala/system/basic/WskBasicTests.scala b/tests/src/test/scala/system/basic/WskBasicTests.scala
index 7dba348..d83cf6f 100644
--- a/tests/src/test/scala/system/basic/WskBasicTests.scala
+++ b/tests/src/test/scala/system/basic/WskBasicTests.scala
@@ -25,6 +25,7 @@ import scala.language.postfixOps
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
+import common.ActivationResult
import common.TestHelpers
import common.TestCLIUtils
import common.TestUtils._
@@ -370,7 +371,7 @@ class WskBasicTests
}
val stderr = wsk.action.invoke(name, blocking = true, expectedExitCode = 246).stderr
- CliActivation.serdes.read(removeCLIHeader(stderr).parseJson).response.result shouldBe Some {
+ ActivationResult.serdes.read(removeCLIHeader(stderr).parseJson).response.result shouldBe Some {
JsObject("error" -> JsObject("msg" -> "failed activation on purpose".toJson))
}
}
diff --git a/tests/src/test/scala/system/basic/WskSequenceTests.scala b/tests/src/test/scala/system/basic/WskSequenceTests.scala
index 688c5c6..3a1dbe3 100644
--- a/tests/src/test/scala/system/basic/WskSequenceTests.scala
+++ b/tests/src/test/scala/system/basic/WskSequenceTests.scala
@@ -27,6 +27,7 @@ import scala.util.matching.Regex
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
+import common.ActivationResult
import common.StreamLogging
import common.TestHelpers
import common.TestCLIUtils
@@ -475,7 +476,7 @@ class WskSequenceTests
* checks duration
* checks memory
*/
- private def checkSequenceLogsAndAnnotations(activation: CliActivation, size: Int) = {
+ private def checkSequenceLogsAndAnnotations(activation: ActivationResult, size: Int) = {
activation.logs shouldBe defined
// check that the logs are what they are supposed to be (activation ids)
// check that the cause field is properly set for these activations
@@ -520,7 +521,7 @@ class WskSequenceTests
}
}
- private def extractMemoryAnnotation(activation: CliActivation): Long = {
+ private def extractMemoryAnnotation(activation: ActivationResult): Long = {
val limits = activation.getAnnotationValue("limits")
limits shouldBe defined
limits.get.asJsObject.getFields("memory")(0).convertTo[Long]
--
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>.