You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/14 13:23:18 UTC

[GitHub] dubee closed pull request #31: WIP: remove base64 encoding

dubee closed pull request #31: WIP: remove base64 encoding
URL: https://github.com/apache/incubator-openwhisk-package-deploy/pull/31
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/packages/actions/deployWeb.js b/packages/actions/deployWeb.js
index 282a9ae..a631477 100644
--- a/packages/actions/deployWeb.js
+++ b/packages/actions/deployWeb.js
@@ -75,7 +75,7 @@ function main(params) {
           resolve({
             statusCode: 200,
             headers: { 'Content-Type': 'application/json' },
-            body: Buffer.from(JSON.stringify({ status: success, activationId })).toString('base64'),
+            body: { status: success, activationId },
           });
         }))
       .catch(err => (sendError(400, err)));
@@ -120,7 +120,7 @@ function sendError(statusCode, err, message) {
   return {
     statusCode,
     headers: { 'Content-Type': 'application/json' },
-    body: Buffer.from(JSON.stringify(params)).toString('base64'),
+    body: params,
   };
 }
 
diff --git a/tests/src/test/scala/packages/deployWebTests.scala b/tests/src/test/scala/packages/deployWebTests.scala
index 054aa06..0ffbed2 100644
--- a/tests/src/test/scala/packages/deployWebTests.scala
+++ b/tests/src/test/scala/packages/deployWebTests.scala
@@ -52,9 +52,10 @@ class DeployWebTests extends TestHelpers
     val helloWorldActionPackage = "myPackage/helloworld"
 
     // statuses from deployWeb
-    val successStatus = """"status":"success""""
+    val successStatus = """"status": "success""""
     val activationId = """"activationId:""""
-    val githubNonExistentStatus = """"error":"There was a problem cloning from github.  Does that github repo exist?  Does it begin with http?""""
+    val githubNonExistentStatus = """"error": "There was a problem cloning from github.  Does that github repo exist?  Does it begin with http?""""
+    val errorLoadingManifestStatus = """"error": "Error loading manifest file. Does a manifest file exist?""""
 
     def makePostCallWithExpectedResult(params: JsObject, expectedResult: String, expectedCode: Int) = {
       val response = RestAssured.given()
@@ -107,7 +108,7 @@ class DeployWebTests extends TestHelpers
         "manifestPath" -> JsString(helloWorldPath),
         "wskApiHost" -> JsString(wskprops.apihost),
         "wskAuth" -> JsString(wskprops.authKey)
-      ), """"error":"Please enter the GitHub repo url in params"""", 400)
+      ), """"error": "Please enter the GitHub repo url in params"""", 400)
     }
 
     // test to create a template with a nonexistant github repo provided
@@ -141,7 +142,7 @@ class DeployWebTests extends TestHelpers
         "manifestPath" -> JsString(incorrectManifestPath),
         "wskApiHost" -> JsString(wskprops.apihost),
         "wskAuth" -> JsString(wskprops.authKey)
-      ), """"error":"Error loading manifest file. Does a manifest file exist?"""", 400)
+      ), errorLoadingManifestStatus, 400)
     }
 
     // test to create a template with manifestPath provided, but no manifestFile existing
@@ -151,6 +152,6 @@ class DeployWebTests extends TestHelpers
         "manifestPath" -> JsString(helloWorldWithNoManifest),
         "wskApiHost" -> JsString(wskprops.apihost),
         "wskAuth" -> JsString(wskprops.authKey)
-      ), """"error":"Error loading manifest file. Does a manifest file exist?"""", 400)
+      ), errorLoadingManifestStatus, 400)
     }
 }
diff --git a/tools/travis/build.sh b/tools/travis/build.sh
index 65977f8..3b2430f 100755
--- a/tools/travis/build.sh
+++ b/tools/travis/build.sh
@@ -40,6 +40,7 @@ cd $WHISKDIR/ansible
 
 $ANSIBLE_CMD wipe.yml
 $ANSIBLE_CMD openwhisk.yml
+$ANSIBLE_CMD properties.yml
 
 # Set Environment
 export OPENWHISK_HOME=$WHISKDIR


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services