Skip to content
Permalink
Browse files

tests: 123-lua-path.t: fixed a few test cases failing in EC2 to-ngx_l…

…ua 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.
  • Loading branch information...
thibaultcha committed Apr 22, 2019
1 parent 7be0a4d commit 86941a706bb8522aee973640305ed3e443ae57e6
Showing with 5 additions and 5 deletions.
  1. +5 −5 t/123-lua-path.t
@@ -11,7 +11,7 @@ repeat_each(2);

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

$ENV{LUA_PATH} = "/foo/bar/baz";
$ENV{LUA_PATH} = "../lua-resty-core/lib/?.lua;../lua-resty-lrucache/lib/?.lua;/foo/bar/baz";
$ENV{LUA_CPATH} = "/baz/bar/foo";
#no_diff();
#no_long_string();
@@ -36,8 +36,8 @@ env LUA_CPATH;
}
--- request
GET /lua
--- response_body
../lua-resty-core/lib/?.lua;../lua-resty-lrucache/lib/?.lua;/foo/bar/baz
--- response_body_like
(?:\.\.\/lua-resty-core\/lib\/\?\.lua;\.\.\/lua-resty-lrucache\/lib\/\?\.lua;){1,2}\/foo\/bar\/baz
/baz/bar/foo

--- no_error_log
@@ -60,8 +60,8 @@ env LUA_CPATH;
}
--- request
GET /lua
--- response_body
../lua-resty-core/lib/?.lua;../lua-resty-lrucache/lib/?.lua;/foo/bar/baz
--- response_body_like
(?:\.\.\/lua-resty-core\/lib\/\?\.lua;\.\.\/lua-resty-lrucache\/lib\/\?\.lua;){1,2}\/foo\/bar\/baz
/baz/bar/foo

--- no_error_log

0 comments on commit 86941a7

Please sign in to comment.
You can’t perform that action at this time.