This is an automated email from the ASF dual-hosted git repository.
dubeejw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 291508a Test updates needed in order to be able to test quoted string
changes in the cli (#3045)
291508a is described below
commit 291508a49ade60eae77d9c0e169686863f853e97
Author: Jesus Alva <[email protected]>
AuthorDate: Wed Dec 13 14:21:09 2017 -0600
Test updates needed in order to be able to test quoted string changes in
the cli (#3045)
---
tests/src/test/scala/common/BaseWsk.scala | 9 ++++++---
tests/src/test/scala/common/Wsk.scala | 20 ++++++++++++++++----
tests/src/test/scala/common/rest/WskRest.scala | 9 ++++++---
3 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/tests/src/test/scala/common/BaseWsk.scala
b/tests/src/test/scala/common/BaseWsk.scala
index 0917fa6..775bfe0 100644
--- a/tests/src/test/scala/common/BaseWsk.scala
+++ b/tests/src/test/scala/common/BaseWsk.scala
@@ -284,10 +284,13 @@ trait BaseActivation extends BaseRunWsk {
def get(activationId: Option[String] = None,
expectedExitCode: Int = SUCCESS_EXIT,
fieldFilter: Option[String] = None,
- last: Option[Boolean] = None)(implicit wp: WskProps): RunResult
+ last: Option[Boolean] = None,
+ summary: Option[Boolean] = None)(implicit wp: WskProps): RunResult
- def console(duration: Duration, since: Option[Duration] = None,
expectedExitCode: Int = SUCCESS_EXIT)(
- implicit wp: WskProps): RunResult
+ def console(duration: Duration,
+ since: Option[Duration] = None,
+ expectedExitCode: Int = SUCCESS_EXIT,
+ actionName: Option[String] = None)(implicit wp: WskProps):
RunResult
def logs(activationId: Option[String] = None, expectedExitCode: Int =
SUCCESS_EXIT, last: Option[Boolean] = None)(
implicit wp: WskProps): RunResult
diff --git a/tests/src/test/scala/common/Wsk.scala
b/tests/src/test/scala/common/Wsk.scala
index 5a45192..1192e6e 100644
--- a/tests/src/test/scala/common/Wsk.scala
+++ b/tests/src/test/scala/common/Wsk.scala
@@ -499,10 +499,17 @@ class WskActivation() extends RunWskCmd with
HasActivation with WaitFor with Bas
*
* @param duration exits console after duration
* @param since (optional) time travels back to activation since given
duration
+ * @param actionName (optional) name of entity to filter activation records
on.
*/
- override def console(duration: Duration, since: Option[Duration] = None,
expectedExitCode: Int = SUCCESS_EXIT)(
- implicit wp: WskProps): RunResult = {
- val params = Seq(noun, "poll", "--auth", wp.authKey, "--exit",
duration.toSeconds.toString) ++ {
+ override def console(duration: Duration,
+ since: Option[Duration] = None,
+ expectedExitCode: Int = SUCCESS_EXIT,
+ actionName: Option[String] = None)(implicit wp:
WskProps): RunResult = {
+ val params = Seq(noun, "poll") ++ {
+ actionName map { name =>
+ Seq(name)
+ } getOrElse Seq()
+ } ++ Seq("--auth", wp.authKey, "--exit", duration.toSeconds.toString) ++ {
since map { s =>
Seq("--since-seconds", s.toSeconds.toString)
} getOrElse Seq()
@@ -563,7 +570,8 @@ class WskActivation() extends RunWskCmd with HasActivation
with WaitFor with Bas
override def get(activationId: Option[String] = None,
expectedExitCode: Int = SUCCESS_EXIT,
fieldFilter: Option[String] = None,
- last: Option[Boolean] = None)(implicit wp: WskProps):
RunResult = {
+ last: Option[Boolean] = None,
+ summary: Option[Boolean] = None)(implicit wp: WskProps):
RunResult = {
val params = {
activationId map { a =>
Seq(a)
@@ -576,6 +584,10 @@ class WskActivation() extends RunWskCmd with HasActivation
with WaitFor with Bas
last map { l =>
Seq("--last")
} getOrElse Seq()
+ } ++ {
+ summary map { s =>
+ Seq("--summary")
+ } getOrElse Seq()
}
cli(wp.overrides ++ Seq(noun, "get", "--auth", wp.authKey) ++ params,
expectedExitCode)
}
diff --git a/tests/src/test/scala/common/rest/WskRest.scala
b/tests/src/test/scala/common/rest/WskRest.scala
index 4d83d8b..a3f870b 100644
--- a/tests/src/test/scala/common/rest/WskRest.scala
+++ b/tests/src/test/scala/common/rest/WskRest.scala
@@ -617,8 +617,10 @@ class WskRestActivation extends RunWskRestCmd with
HasActivationRest with WaitFo
* @param duration exits console after duration
* @param since (optional) time travels back to activation since given
duration
*/
- override def console(duration: Duration, since: Option[Duration] = None,
expectedExitCode: Int = SUCCESS_EXIT)(
- implicit wp: WskProps): RestResult = {
+ override def console(duration: Duration,
+ since: Option[Duration] = None,
+ expectedExitCode: Int = SUCCESS_EXIT,
+ actionName: Option[String] = None)(implicit wp:
WskProps): RestResult = {
require(duration > 1.second, "duration must be at least 1 second")
val sinceTime = {
val now = System.currentTimeMillis()
@@ -743,7 +745,8 @@ class WskRestActivation extends RunWskRestCmd with
HasActivationRest with WaitFo
override def get(activationId: Option[String],
expectedExitCode: Int = OK.intValue,
fieldFilter: Option[String] = None,
- last: Option[Boolean] = None)(implicit wp: WskProps):
RestResult = {
+ last: Option[Boolean] = None,
+ summary: Option[Boolean] = None)(implicit wp: WskProps):
RestResult = {
val r = activationId match {
case Some(id) => {
val resp = requestEntity(GET, getNamePath(noun, id))
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].