Skip to content

Commit 2d79dec

Browse files
committed
test: make ssl/xrpc tests work with OpenResty 1.29.2.4 runtime
The apisix-runtime build moved to OpenResty 1.29.2.4 (lua-resty-core / stream-lua 0.0.19), which changed behavior these tests assert on: - t/ssl.t TEST 3/5: the lua-resty-core tlshandshake patch reworded its validation errors ("... both setting" -> "... cannot both be set"; "bad client_cert option type" -> "bad client_cert_path option type"). Match both wordings with a version-tolerant regex so the test passes on both runtimes. - t/stream/xrpc/{downstream,upstream}.t: assert stream-lua internal buffer-allocation debug logs that no longer appear in stream-lua 0.0.19. Exclude them on apisix-runtime; they still run on api7ee-runtime (OR 1.21, stream-lua 0.0.16) for functional coverage.
1 parent 68c2219 commit 2d79dec

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ jobs:
1515
- name: apisix-runtime
1616
script_url: "https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-runtime.sh"
1717
script_name: "build-apisix-runtime.sh"
18-
exclude_tests: ""
18+
# These assert stream-lua internal buffer-allocation debug logs that
19+
# changed in OpenResty 1.29.2.4 (stream-lua 0.0.19); they still run on
20+
# api7ee-runtime (OR 1.21, stream-lua 0.0.16) for functional coverage.
21+
exclude_tests: "t/stream/xrpc/downstream.t t/stream/xrpc/upstream.t"
1922
- name: api7ee-runtime
2023
script_url: "https://raw.githubusercontent.com/api7/apisix-build-tools/release/api7ee-runtime/build-api7ee-runtime.sh"
2124
script_name: "build-api7ee-runtime.sh"

t/ssl.t

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,9 @@ location /t {
186186
}
187187
}
188188
--- error_code: 500
189-
--- error_log
190-
client client_cert_path and client_cert both setting
189+
--- error_log eval
190+
# message reworded in the lua-resty-core tlshandshake patch for OpenResty 1.29.2.4
191+
qr/client_cert_path and client_cert (both setting|cannot both be set)/
191192
192193
193194
@@ -275,5 +276,6 @@ location /t {
275276
}
276277
}
277278
--- error_code: 500
278-
--- error_log
279-
bad client_cert option type
279+
--- error_log eval
280+
# OpenResty 1.29.2.4 reports the path-specific message ("bad client_cert_path option type")
281+
qr/bad client_cert(_path)? option type/

0 commit comments

Comments
 (0)