Skip to content

Commit a5cd0c8

Browse files
committed
tests: 123-lua-path.t: fixed a few test cases failing in EC2 to-ngx_stream_lua suite.
In to-ngx_lua, the paths to lua-resty-core and lua-resty-lrucache are not included by default, but is still required for Nginx to start due to the default value of `lua_load_resty_core`. Hence, we always provide those paths via the `LUA_PATH` env variable. In non-to-* suites, those paths will thus be present twice, so the regexes take that into consideration.
1 parent 8450734 commit a5cd0c8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎t/123-lua-path.t‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repeat_each(2);
1212

1313
plan tests => repeat_each() * (blocks() * 3 + 1);
1414

15-
$ENV{LUA_PATH} = "/foo/bar/baz";
15+
$ENV{LUA_PATH} = "../lua-resty-core/lib/?.lua;../lua-resty-lrucache/lib/?.lua;/foo/bar/baz";
1616
$ENV{LUA_CPATH} = "/baz/bar/foo";
1717
#no_diff();
1818
#no_long_string();
@@ -33,8 +33,8 @@ env LUA_CPATH;
3333
ngx.say(package.path)
3434
ngx.say(package.cpath)
3535
}
36-
--- stream_response
37-
../lua-resty-core/lib/?.lua;../lua-resty-lrucache/lib/?.lua;/foo/bar/baz
36+
--- stream_response_like
37+
(?:\.\.\/lua-resty-core\/lib\/\?\.lua;\.\.\/lua-resty-lrucache\/lib\/\?\.lua;){1,2}\/foo\/bar\/baz
3838
/baz/bar/foo
3939

4040
--- no_error_log
@@ -53,8 +53,8 @@ env LUA_CPATH;
5353
ngx.say(package.path)
5454
ngx.say(package.cpath)
5555
}
56-
--- stream_response
57-
../lua-resty-core/lib/?.lua;../lua-resty-lrucache/lib/?.lua;/foo/bar/baz
56+
--- stream_response_like
57+
(?:\.\.\/lua-resty-core\/lib\/\?\.lua;\.\.\/lua-resty-lrucache\/lib\/\?\.lua;){1,2}\/foo\/bar\/baz
5858
/baz/bar/foo
5959

6060
--- no_error_log

0 commit comments

Comments
 (0)