Skip to content

Commit

Permalink
tests(proxy-wasm/go) internalize an HTTP I/O test case
Browse files Browse the repository at this point in the history
Currently the most unreliable test case in CI.

Pin it to port 2000 (arbitrary)
  • Loading branch information
thibaultcha committed Aug 10, 2023
1 parent 78120ba commit a035f01
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions t/03-proxy_wasm/sdks/002-go_sdk/006-http_auth_random.t
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,30 @@ run_tests();
__DATA__
=== TEST 1: proxy_wasm Go SDK - http_auth_random example
--- skip_eval: 6: defined $ENV{TEST_NGINX_RANDOMIZE} && $ENV{TEST_NGINX_RANDOMIZE}
--- timeout eval: $::ExtTimeout
--- load_nginx_modules: ngx_http_echo_module
--- main_config eval
qq{
wasm {
module go_http_auth_random $ENV{TEST_NGINX_CRATES_DIR}/go_http_auth_random.wasm;
socket_connect_timeout $::ExtTimeout;
socket_send_timeout $::ExtTimeout;
socket_read_timeout $::ExtTimeout;
}
}
--- http_config
server {
listen 2000;
server_name httpbin;
location /uuid {
# Generating a uuid seems excessive; $request_id has some
# randomness on a distribution of runs of this test.
echo $request_id;
}
}
--- config eval
qq{
resolver $::ExtResolver;
resolver_timeout $::ExtTimeout;
resolver_add 127.0.0.1 httpbin;
location /uuid {
proxy_wasm go_http_auth_random;
Expand Down
2 changes: 1 addition & 1 deletion util/build_proxy_wasm_go_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pushd $DIR_PROXY_WASM_GO_SDK
)
-const clusterName = "httpbin"
+const clusterName = "httpbin.org"
+const clusterName = "httpbin:2000"
func main() {
proxywasm.SetVMContext(&vmContext{})
Expand Down

0 comments on commit a035f01

Please sign in to comment.