Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb1977f
commit a312a4c
Showing
7 changed files
with
97 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
apiVersion: openwhisk.seed.ibm.com/v1beta1 | ||
kind: Function | ||
metadata: | ||
name: myfunction | ||
namespace: default | ||
name: greetings | ||
spec: | ||
codeURI: https://raw.githubusercontent.com/apache/incubator-openwhisk-catalog/master/packages/utils/echo.js | ||
runtime: nodejs:6 | ||
parameters: | ||
- name: message | ||
value: "Hello" | ||
value: Bonjour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
function td::run() { | ||
u::begin_testcase "should deploy documentation examples" | ||
|
||
kubectl apply -f greetings.yaml | ||
object::wait_function_online greetings 10 | ||
|
||
result=$(ibmcloud wsk action invoke greetings -br) | ||
u::assert_equal '{ "message": "Bonjour"}' "$result" | ||
|
||
u::end_testcase | ||
} | ||
|
||
function td::cleanup() { | ||
kubectl delete -f greetings.yaml | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Extract properties from .wskprops | ||
AUTH=$(cat ~/.wskprops | grep 'AUTH' | awk -F= '{print $2}') | ||
APIHOST=$(cat ~/.wskprops | grep 'APIHOST' | awk -F= '{print $2}') | ||
|
||
# And create secret | ||
kubectl create secret generic seed-defaults-owprops \ | ||
--from-literal=apihost=$APIHOST \ | ||
--from-literal=auth=$AUTH |