-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Hello!
I try just to execute the current test suite by instruction from the README:
luarocks install lunit
luarocks install lua-cjson
luarocks install luaposix
luarocks install luasocket
luarocks install luasec
make test
But getting this strange error in output:
root@c01a546084c0:/docker# make test
luacheck .
Checking raven/init.lua OK
Checking raven/senders/luasocket.lua OK
Checking raven/senders/ngx.lua OK
Checking raven/senders/reference.lua OK
Checking raven/senders/test.lua OK
Checking raven/util.lua OK
Total: 0 warnings / 0 errors in 6 files
tsc tests/*.lua
14 tests 14 passed 100 assertions 0 failed 0 errors 0 unassertive 0 pending
sed -e "s|%PWD%|$PWD|" tests/sentry.conf > tests/sentry.conf.out
touch empty-file
resty --http-include $PWD/tests/sentry.conf.out -e 'require("luarocks.loader"); require("telescope.runner")(arg)' empty-file tests/resty/*.lua
ERROR: (command line -e):1: module 'telescope.runner' not found:No LuaRocks module found for telescope.runner
no field package.preload['telescope.runner']
no file '/usr/local/openresty/site/lualib/telescope/runner.ljbc'
no file '/usr/local/openresty/site/lualib/telescope/runner/init.ljbc'
no file '/usr/local/openresty/lualib/telescope/runner.ljbc'
no file '/usr/local/openresty/lualib/telescope/runner/init.ljbc'
no file '/usr/local/openresty/site/lualib/telescope/runner.lua'
no file '/usr/local/openresty/site/lualib/telescope/runner/init.lua'
no file '/usr/local/openresty/lualib/telescope/runner.lua'
no file '/usr/local/openresty/lualib/telescope/runner/init.lua'
no file './telescope/runner.lua'
no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/telescope/runner.lua'
no file '/usr/local/share/lua/5.1/telescope/runner.lua'
no file '/usr/local/share/lua/5.1/telescope/runner/init.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/telescope/runner.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/telescope/runner/init.lua'
no file '/root/.luarocks/share/lua/5.1/telescope/runner.lua'
no file '/root/.luarocks/share/lua/5.1/telescope/runner/init.lua'
no file '/usr/local/openresty/site/lualib/telescope/runner.so'
no file '/usr/local/openresty/lualib/telescope/runner.so'
no file './telescope/runner.so'
no file '/usr/local/lib/lua/5.1/telescope/runner.so'
no file '/usr/local/openresty/luajit/lib/lua/5.1/telescope/runner.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/root/.luarocks/lib/lua/5.1/telescope/runner.so'
no file '/usr/local/openresty/site/lualib/telescope.so'
no file '/usr/local/openresty/lualib/telescope.so'
no file './telescope.so'
no file '/usr/local/lib/lua/5.1/telescope.so'
no file '/usr/local/openresty/luajit/lib/lua/5.1/telescope.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/root/.luarocks/lib/lua/5.1/telescope.so'
stack traceback:
(command line -e):1: in function 'inline_gen'
init_worker_by_lua:53: in function <init_worker_by_lua:52>
[C]: in function 'xpcall'
init_worker_by_lua:61: in function <init_worker_by_lua:59>
make: *** [Makefile:16: test] Error 1
How to reproduce
Clone the master branch of the repository and go inside a root directory.
My environment is Docker image:
FROM openresty/openresty:1.17.8.2-buster
# Install LuaRocks
# based on https://github.com/openresty/docker-openresty/blob/6c7af091115a3da62038a93fb9e4c76ef7080bb7/buster/Dockerfile.luarocks_example
ARG RESTY_LUAROCKS_VERSION="3.3.1"
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
make \
unzip \
&& cd /tmp \
&& curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& cd luarocks-${RESTY_LUAROCKS_VERSION} \
&& ./configure \
--prefix=/usr/local/openresty/luajit \
--with-lua=/usr/local/openresty/luajit \
--lua-suffix=jit-2.1.0-beta3 \
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \
&& make build \
&& make install \
&& cd /tmp \
&& rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz
WORKDIR /tmp
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
gcc \
liblua5.1-dev \
libssl-dev \
lua-check \
openresty-opm
RUN luarocks install telescope 0.6.0-1 \
&& luarocks install lunit 0.5-2 \
&& luarocks install lua-cjson 2.1.0.6-1 \
&& luarocks install luaposix 35.0-1 \
&& luarocks install luasocket 3.0rc1-2 \
&& luarocks install luasec 0.9-1Dump this content to Dockerfile file in the root of the repository. Then run these commands:
docker build -t resty-rocks .
docker run --rm -it -v "$(pwd):/docker/" -w /docker resty-rocks bashThen just execute make test inside the container.
As you can see, I've did luarocks install telescope 0.6.0-1 to Dockerfile. Without these I got error about tsc command. I think we should add this command to README.md at least because it required to run the tests.
But this library haven't telescope.runner package. Can you advice how to fix the issue?
Metadata
Metadata
Assignees
Labels
No labels