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 2018/02/22 19:59:04 UTC

[incubator-openwhisk-cli] branch master updated (abc668c -> ad8ff76)

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

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


    from abc668c  sync tests with openwhisk (#228)
     new 011fe3d  Fix keystore
     new ad8ff76  Fix trigger test

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:
 settings.gradle                                    |  2 ++
 tests/build.gradle                                 | 22 ++++++++++++++++++++++
 .../test/scala/system/basic/WskBasicTests.scala    | 14 ++++++--------
 3 files changed, 30 insertions(+), 8 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
csantanapr@apache.org.

[incubator-openwhisk-cli] 02/02: Fix trigger test

Posted by cs...@apache.org.
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 ad8ff7681eb330290a3a8d1c33aa1710da5cf73d
Author: dubeejw <jw...@us.ibm.com>
AuthorDate: Wed Feb 21 02:47:45 2018 -0500

    Fix trigger test
---
 tests/src/test/scala/system/basic/WskBasicTests.scala | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/tests/src/test/scala/system/basic/WskBasicTests.scala b/tests/src/test/scala/system/basic/WskBasicTests.scala
index a785559..c78d7f1 100644
--- a/tests/src/test/scala/system/basic/WskBasicTests.scala
+++ b/tests/src/test/scala/system/basic/WskBasicTests.scala
@@ -545,20 +545,18 @@ class WskBasicTests extends TestHelpers with WskTestHelpers {
       trigger.create(name, annotations = annots)
     }
 
-    val result = wsk.trigger.get(name)
+    val result = getJSONFromResponse(wsk.trigger.get(name).stdout, true)
     val ns = wsk.namespace.whois()
-    val annos = getJSONFromResponse(result.stdout, true).fields("annotations")
 
-    getJSONFromResponse(result.stdout, true).fields("name") shouldBe name.toJson
-    getJSONFromResponse(result.stdout, true).fields("namespace") shouldBe ns.toJson
-
-    annos shouldBe JsArray(
+    result.fields("name") shouldBe name.toJson
+    result.fields("namespace") shouldBe ns.toJson
+    result.fields("annotations") shouldBe JsArray(
       JsObject("key" -> JsString("description"), "value" -> JsString("Trigger description")),
       JsObject(
         "key" -> JsString("parameters"),
         "value" -> JsArray(
-          JsObject("name" -> JsString("paramName1"), "description" -> JsString("Parameter description 1")),
-          JsObject("name" -> JsString("paramName2"), "description" -> JsString("Parameter description 2")))))
+          JsObject("description" -> JsString("Parameter description 1"), "name" -> JsString("paramName1")),
+          JsObject("description" -> JsString("Parameter description 2"), "name" -> JsString("paramName2")))))
   }
 
   it should "create a trigger with a name that contains spaces" in withAssetCleaner(wskprops) { (wp, assetHelper) =>

-- 
To stop receiving notification emails like this one, please contact
csantanapr@apache.org.

[incubator-openwhisk-cli] 01/02: Fix keystore

Posted by cs...@apache.org.
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 011fe3ddfd077bf2b6a665d9845a885b52cefeb5
Author: dubeejw <jw...@us.ibm.com>
AuthorDate: Wed Feb 21 01:54:39 2018 -0500

    Fix keystore
---
 settings.gradle    |  2 ++
 tests/build.gradle | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/settings.gradle b/settings.gradle
index dd36ccf..4f5a4d8 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -33,3 +33,5 @@ gradle.ext.scala = [
     version: '2.11.8',
     compileFlags: ['-feature', '-unchecked', '-deprecation', '-Xfatal-warnings', '-Ywarn-unused-import']
 ]
+
+gradle.ext.owPath = owPath
diff --git a/tests/build.gradle b/tests/build.gradle
index ec54e0f..22a54ec 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -40,3 +40,25 @@ dependencies {
 tasks.withType(ScalaCompile) {
     scalaCompileOptions.additionalParameters = gradle.scala.compileFlags
 }
+
+
+def keystorePath = new File(sourceSets.test.scala.outputDir, 'keystore')
+task deleteKeystore(type: Delete) {
+    delete keystorePath
+}
+
+task createKeystore(dependsOn: deleteKeystore) {
+    doLast {
+        Properties props = new Properties()
+        props.load(new FileInputStream(file(gradle.owPath + '/whisk.properties')))
+        keystorePath.parentFile.mkdirs()
+        def cmd = ['keytool', '-import', '-alias', 'Whisk', '-noprompt', '-trustcacerts', '-file', file(props['whisk.ssl.cert']), '-keystore', keystorePath, '-storepass', 'openwhisk']
+        cmd.execute().waitForProcessOutput(System.out, System.err)
+    }
+}
+
+afterEvaluate {
+    tasks.withType(Test) {
+        dependsOn createKeystore
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
csantanapr@apache.org.