Skip to content

Commit

Permalink
test: fix case
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 committed Nov 19, 2021
1 parent 96f9ce2 commit 57f7792
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/linux-ci-init-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ docker exec -i apache-apisix_kafka-server2_1 /opt/bitnami/kafka/bin/kafka-topics
docker pull openwhisk/action-nodejs-v14:nightly
docker run --rm -d -h openwhisk --name openwhisk -p 3233:3233 -p 3232:3232 -v /var/run/docker.sock:/var/run/docker.sock openwhisk/standalone:nightly
docker exec -i openwhisk waitready
docker exec -i openwhisk bash -c "wsk action update test <(echo 'function main(args){return {"hello":args.name}}') --kind nodejs:14"
docker exec -i openwhisk bash -c "wsk action update test <(echo 'function main(args){return {"hello":args.name || "test"}}') --kind nodejs:14"
7 changes: 4 additions & 3 deletions t/plugin/openwhisk.t
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,14 @@ passed
=== TEST 5: hit route (with GET request)
--- request
GET /hello
--- error_code: 405
--- response_body chomp
{"hello":"test"}
--- no_error_log
[error]



=== TEST 6: hit route (with non-json format request body)
=== TEST 6: hit route (with POST without non-json format request body)
--- request
POST /hello
test=test
Expand All @@ -145,7 +146,7 @@ Content-Type: application/x-www-form-urlencoded



=== TEST 7: hit route (with correct request body)
=== TEST 7: hit route (with POST and correct request body)
--- request
POST /hello
{"name": "world"}
Expand Down

0 comments on commit 57f7792

Please sign in to comment.