This is an automated email from the ASF dual-hosted git repository.
dgrove 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 8d5857c Adapts test harness to parses activation ids from wsk
activation list with new format. (#4346)
8d5857c is described below
commit 8d5857c91ec9ebc583b5eea8f7191c31b559e047
Author: rodric rabbah <[email protected]>
AuthorDate: Thu Mar 14 22:29:32 2019 -0400
Adapts test harness to parses activation ids from wsk activation list with
new format. (#4346)
* Adapts test harness to parses activation ids from wsk activation list
with new format.
---
tests/src/test/scala/common/WskCliOperations.scala | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/tests/src/test/scala/common/WskCliOperations.scala
b/tests/src/test/scala/common/WskCliOperations.scala
index 722bda5..137cf9e 100644
--- a/tests/src/test/scala/common/WskCliOperations.scala
+++ b/tests/src/test/scala/common/WskCliOperations.scala
@@ -517,14 +517,11 @@ class CliActivationOperations(val wsk: RunCliCmd) extends
ActivationOperations w
* @return sequence of activations
*/
def ids(rr: RunResult): Seq[String] = {
- rr.stdout.split("\n") filter {
- // remove empty lines the header
- s =>
- s.nonEmpty && s != "activations"
- } map {
- // split into (id, name)
- _.split(" ")(0)
- }
+ val lines = rr.stdout.split("\n")
+ val header = lines(0)
+ // old format has the activation id first, new format has activation id in
third column
+ val column = if (header.startsWith("activations")) 0 else 2
+ lines.drop(1).map(_.split(" ")(column)) // drop the header and grab just
the activationId column
}
/**