You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by pd...@apache.org on 2019/05/08 17:05:02 UTC
[incubator-openwhisk-devtools] branch master updated: Add updated
test jars and test http payloads (#258)
This is an automated email from the ASF dual-hosted git repository.
pdesai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git
The following commit(s) were added to refs/heads/master by this push:
new 1f27b3b Add updated test jars and test http payloads (#258)
1f27b3b is described below
commit 1f27b3b2c5ad5dec49591ed0d4edebfeb53653d4
Author: Matt Rutkowski <mr...@us.ibm.com>
AuthorDate: Wed May 8 12:04:56 2019 -0500
Add updated test jars and test http payloads (#258)
* Update tests for java8 dockerfile
* Update tests for java8 dockerfile
---
.gitignore | 1 +
.../java/tests/knative/helloworld/README.md | 51 ++++++++++++++++++++
.../tests/knative/helloworldwithparams/Hello.java | 30 ++++++++++++
.../tests/knative/helloworldwithparams/README.md | 52 ++++++++++++++++++++
.../tests/knative/helloworldwithparams/hello.jar | Bin 0 -> 1107 bytes
.../knative-data-init-run.json | 2 +-
.../helloworldwithparams/knative-data-init.json | 2 +-
.../helloworldwithparams/openwhisk-data-init.json | 2 +-
.../payload-knative-init-run.http | 2 +-
.../helloworldwithparams/payload-knative-init.http | 2 +-
.../payload-openwhisk-init.http | 2 +-
.../knative/helloworldwithparamsfromenv/Hello.java | 27 +++++++++++
.../knative/helloworldwithparamsfromenv/README.md | 53 +++++++++++++++++++++
.../knative/helloworldwithparamsfromenv/hello.jar | Bin 0 -> 1069 bytes
.../knative-data-init-run.json | 2 +-
.../knative-data-init.json | 2 +-
.../openwhisk-data-init.json | 2 +-
.../payload-knative-init-run.http | 2 +-
.../payload-openwhisk-init.http | 2 +-
19 files changed, 225 insertions(+), 11 deletions(-)
diff --git a/.gitignore b/.gitignore
index 309bf07..8f36644 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@ package-lock.json
# Java
*.class
+*.base64
out/
# Swift
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/README.md b/knative-build/runtimes/java/tests/knative/helloworld/README.md
index 812edf6..8b83ab5 100644
--- a/knative-build/runtimes/java/tests/knative/helloworld/README.md
+++ b/knative-build/runtimes/java/tests/knative/helloworld/README.md
@@ -72,3 +72,54 @@ curl -H "Host: java-helloworld.default.example.com" -d "@openwhisk-data-run.json
{"payload":"Hello World!"}
```
+
+## Updating the testcase
+
+### Create the jar file
+
+```
+$ jar cf hello.jar Hello.java
+```
+
+### Base64 encode the jar file
+```
+$ base64 hello.jar > hello.jar.base64
+```
+
+hello.jar.base64 then contains:
+
+```
+UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7t9fHEFhawRcmnH [...]
+```
+
+### Update value for "code" key in test file
+
+Any file that contains an "init" payload will need to be updated. For example, using ```payload-knative-init-run.http``` as an example:
+
+```
+POST http://localhost:8080/ HTTP/1.1
+content-type: application/json
+
+{
+ "init": {
+ "name": "java-helloworld",
+ "main": "Hello",
+ "binary": true,
+ "code" : "UEsDBBQACAgIABljwUoAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAZY8FKAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEmxkoaPgXJSbnpCo45xcV5BcllgCVa/Jy8XIBAFBLBwhiwEEKQwAAAEQAAABQSwMEFAAICAgACmPBSgAAAAAAAAAAAAAAAAsAAABIZWxsby5jbGFzc31T227TQBA9k5tdx6HBtCkUUhpuTdK0Bkq5NFUlioQQSqFSUCV428Qr4+JL5DgVfAp/AS+pRCU+gG9CiFmLgFTSWvLM7J6Zc2Zn7R+/vn0H8ABtAxaqOpZ0XDegYVmZmoEbuKnhlloweFvDHQOGCleUr+toKN9U+KqGlo [...]
+ },
+ "activation": {
+ "namespace": "default",
+ "action_name": "java-helloworld",
+ "api_host": "",
+ "api_key": "",
+ "activation_id": "",
+ "deadline": "4102498800000"
+ },
+ "value": {
+ "name": "Joe",
+ "place": "TX"
+ }
+}
+
+###
+```
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/Hello.java b/knative-build/runtimes/java/tests/knative/helloworldwithparams/Hello.java
new file mode 100644
index 0000000..e10a8f8
--- /dev/null
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparams/Hello.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.google.gson.JsonObject;
+public class Hello {
+ public static JsonObject main(JsonObject args) {
+ String name = "stranger";
+ if (args.has("name"))
+ name = args.getAsJsonPrimitive("name").getAsString();
+ if (args.has("place"))
+ place = args.getAsJsonPrimitive("place").getAsString();
+ JsonObject response = new JsonObject();
+ response.addProperty("greeting", "Hello " + name + " from " + place + "!");
+ return response;
+ }
+}
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/README.md b/knative-build/runtimes/java/tests/knative/helloworldwithparams/README.md
index e5e5550..5120bcb 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparams/README.md
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparams/README.md
@@ -72,3 +72,55 @@ curl -H "Host: java-helloworld-with-params.default.example.com" -d "@openwhisk-d
{"payload":"Hello Joe from TX!"};
```
+---
+
+## Updating the testcase
+
+### Create the jar file
+
+```
+$ jar cf hello.jar Hello.java
+```
+
+### Base64 encode the jar file
+```
+$ base64 hello.jar > hello.jar.base64
+```
+
+hello.jar.base64 then contains:
+
+```
+UEsDBBQACAgIABljwUoAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAZY8FKAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEmxkoaPgXJSbnpCo45xcV5BcllgCVa/Jy8XIBAFBLBwhiwEEKQwAAAEQAAABQSwMEFAAICAgACmPBSgAAAAAAAAAAAAAAAAsAAABIZWxsby5jbGFzc31T227TQBA9k5tdx6HBtCkUUhpuTdK0Bkq5NFUlioQQSqFSUCV428Qr4+JL5DgVfAp/AS+pRCU+gG9CiFmLgFTSWvLM7J6Zc2Zn7R+/vn0H8ABtAxaqOpZ0XDegYVmZmoEbuKnhlloweFvDHQOGCleUr+toKN9U+KqGloY1QmHbC71kh5Ct [...]
+```
+
+### Update value for "code" key in test file
+
+Any file that contains an "init" payload will need to be updated. For example, using ```payload-knative-init-run.http``` as an example:
+
+```
+POST http://localhost:8080/ HTTP/1.1
+content-type: application/json
+
+{
+ "init": {
+ "name" : "java-helloworld-with-params",
+ "main" : "Hello",
+ "binary": true,
+ "code" : "UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7 [...]
+ },
+ "activation": {
+ "namespace": "default",
+ "action_name": "java-helloworld-with-params",
+ "api_host": "",
+ "api_key": "",
+ "activation_id": "",
+ "deadline": "4102498800000"
+ },
+ "value": {
+ "name" : "Joe",
+ "place" : "TX"
+ }
+}
+
+###
+```
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/hello.jar b/knative-build/runtimes/java/tests/knative/helloworldwithparams/hello.jar
new file mode 100644
index 0000000..2c9b625
Binary files /dev/null and b/knative-build/runtimes/java/tests/knative/helloworldwithparams/hello.jar differ
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init-run.json b/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init-run.json
index 2406da1..393ac8f 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init-run.json
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init-run.json
@@ -3,7 +3,7 @@
"name" : "java-helloworld-with-params",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAij [...]
},
"activation": {
"namespace": "default",
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init.json b/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init.json
index 5448727..879cdd4 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init.json
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init.json
@@ -3,6 +3,6 @@
"name" : "java-helloworld-with-params",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAij [...]
}
}
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/openwhisk-data-init.json b/knative-build/runtimes/java/tests/knative/helloworldwithparams/openwhisk-data-init.json
index 5c624cc..8b9fce3 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparams/openwhisk-data-init.json
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparams/openwhisk-data-init.json
@@ -3,6 +3,6 @@
"name" : "java-helloworld-with-params",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7 [...]
}
}
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init-run.http b/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init-run.http
index 7f7fffd..42ab87c 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init-run.http
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init-run.http
@@ -6,7 +6,7 @@ content-type: application/json
"name" : "java-helloworld-with-params",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7 [...]
},
"activation": {
"namespace": "default",
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init.http b/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init.http
index f1a9d56..35ea66b 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init.http
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init.http
@@ -6,7 +6,7 @@ content-type: application/json
"name" : "java-helloworld-with-params",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7 [...]
}
}
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-openwhisk-init.http b/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-openwhisk-init.http
index 8885a5b..ba8f5bf 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-openwhisk-init.http
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-openwhisk-init.http
@@ -6,7 +6,7 @@ content-type: application/json
"name" : "java-helloworld-with-params",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7 [...]
}
}
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/Hello.java b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/Hello.java
new file mode 100644
index 0000000..4dbe8c7
--- /dev/null
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/Hello.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.google.gson.JsonObject;
+public class Hello {
+ public static JsonObject main(JsonObject args) {
+ String name = System.getenv("name");
+ String place = System.getenv("place");
+ JsonObject response = new JsonObject();
+ response.addProperty("greeting", "Hello " + name + " from " + place + "!");
+ return response;
+ }
+}
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/README.md b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/README.md
index 7273d0f..b1679e8 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/README.md
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/README.md
@@ -72,3 +72,56 @@ curl -H "Host: java-helloworld-with-params-from-env.default.example.com" -d "@op
{"payload":"Hello Jess from OK!"};
```
+
+---
+
+## Updating the testcase
+
+### Create the jar file
+
+```
+$ jar cf hello.jar Hello.java
+```
+
+### Base64 encode the jar file
+```
+$ base64 hello.jar > hello.jar.base64
+```
+
+hello.jar.base64 then contains:
+
+```
+UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPXy+2WaX17BXNUKl/HCJ [...]
+```
+
+### Update value for "code" key in test file
+
+Any file that contains an "init" payload will need to be updated. For example, using ```payload-knative-init-run.http``` as an example:
+
+```
+POST http://localhost:8080/ HTTP/1.1
+content-type: application/json
+
+{
+ "init": {
+ "name" : "java-helloworld-with-params-from-env",
+ "main" : "Hello",
+ "binary": true,
+ "code" : "UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPXy+2W [...]
+ },
+ "activation": {
+ "namespace": "default",
+ "action_name": "java-helloworld-with-params-from-env",
+ "api_host": "",
+ "api_key": "",
+ "activation_id": "",
+ "deadline": "4102498800000"
+ },
+ "value": {
+ "name" : "Joe",
+ "place" : "TX"
+ }
+}
+
+###
+```
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/hello.jar b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/hello.jar
new file mode 100644
index 0000000..d2dabbd
Binary files /dev/null and b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/hello.jar differ
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init-run.json b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init-run.json
index cb1d507..951bab6 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init-run.json
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init-run.json
@@ -3,7 +3,7 @@
"name" : "java-helloworld-with-params-from-env",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPX [...]
},
"activation": {
"namespace": "default",
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init.json b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init.json
index 04c705d..26ad4c6 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init.json
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init.json
@@ -3,7 +3,7 @@
"name" : "java-helloworld-with-params-from-env",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPX [...]
}
}
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/openwhisk-data-init.json b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/openwhisk-data-init.json
index 23d0ae0..d2c8777 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/openwhisk-data-init.json
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/openwhisk-data-init.json
@@ -3,6 +3,6 @@
"name" : "java-helloworld-with-params-from-env",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPX [...]
}
}
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-knative-init-run.http b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-knative-init-run.http
index 21581ef..407dfef 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-knative-init-run.http
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-knative-init-run.http
@@ -6,7 +6,7 @@ content-type: application/json
"name" : "java-helloworld-with-params-from-env",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPXy+2W [...]
},
"activation": {
"namespace": "default",
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-openwhisk-init.http b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-openwhisk-init.http
index ea33f3b..9d02b56 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-openwhisk-init.http
+++ b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-openwhisk-init.http
@@ -6,7 +6,7 @@ content-type: application/json
"name" : "java-helloworld-with-params-from-env",
"main" : "Hello",
"binary": true,
- "code" : ""
+ "code" : "UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPXy+2W [...]
}
}