Skip to content

Commit ec72340

Browse files
committed
test: set -e
1 parent 5c1f9d5 commit ec72340

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dev:
1212

1313
.PHONY: test
1414
test:
15-
bash test/test.sh
15+
bash -e test/test.sh
1616

1717
.PHONY: coverage
1818
coverage:

examples/rewrite/rewrite.js

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class RewritePlugin {
2525

2626
async filter(conf, request, response) {
2727
let body = await request.body()
28-
console.log({ body })
2928
request.headers.set('X-Req-A6-JavaScript-Plugin', 'Rewrite')
3029
request.headers.set('X-Req-A6-JavaScript-Rewrite-Example', conf.header)
3130
request.headers.set('X-Req-A6-JavaScript-Rewrite-Example-Body', body)

src/server/rpc.ts

-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ class RPCServer {
150150
const { isStop, response } = await this.runner.httpReqCall(confToken, request)
151151
let action = isStop ? this.createStop(builder, response) : this.createRewrite(builder, request)
152152
let actionType = isStop ? Action.Stop : Action.Rewrite
153-
console.debug({ isStop, response })
154153
HTTPReqCallResponse.startResp(builder)
155154
HTTPReqCallResponse.addId(builder, request.id)
156155
HTTPReqCallResponse.addAction(builder, action)

test/entrypoint.sh

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ while ! nc -z 127.0.0.1 9080; do
1313
done
1414

1515
pushd /usr/local/apisix/javascript-plugin-runner
16+
set -e
17+
1618
npm test
1719

1820
popd

0 commit comments

Comments
 (0)