WIP: remove base64 encoding (#31)
* remove base64 encoding
* remove buffer and tostring
* update with properties.yml
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 @@
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 @@
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 @@
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 @@
"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 @@
"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 @@
"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 @@
$ANSIBLE_CMD wipe.yml
$ANSIBLE_CMD openwhisk.yml
+$ANSIBLE_CMD properties.yml
# Set Environment
export OPENWHISK_HOME=$WHISKDIR