api7 / lua-resty-etcd

Nonblocking Lua etcd driver library for OpenResty

Home Page:https://api7.ai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doc: Running nginx tests failure. `unknown directive "lua_socket_log_errors"`

wfnuser opened this issue · comments

Hi.
I cloned the source code.
Installed some dependencies by the following instructions.
cpan Test::Nginx
brew install nginx version 1.19.5

I mkdir /Users/qinghao/Workspace/OpenSource/apisix/lua-resty-etcd/t/v2/t/servroot in my workdir.
And then I runned prove key.t.
After that I met some errors.

image

My lua version is 5.3.5

I searched it on Google. And it seems lua_socket_log_errors is an Nginx Module provided by openresty? But I'm not very familiar with that. Can anyone give me some clues.

Also, I think there should be some instruction guide for users to learn how to run the test... It takes me some time to figure out https://github.com/openresty/test-nginx has been used since I didn't know it at all before.
I can do that later.

@moonming

Thx. Should we update the readme?

It seems the travis.yml doesn't work on MacOSI? @spacewander

Use Linux, the best OS for developer.

Use Linux, the best OS for developer.

I have solve the env problem on Mac OS. Should I provide a guide for it? @moonming @spacewander

@wfnuser you can submit a new PR, add some doc for this. it maybe helpful for other developer

I don't like this idea. We should not put the whole OpenResty best practice to a simple project.

And we can't keep this documentation up to date. It is nothing about the etcd client.

I don't like this idea. We should not put the whole OpenResty best practice to a simple project.

I can't understand. I think the lua-resty-etcd lib should run on as many platforms as possible? If people are using macOS to develop it, it will be hard to set up the development environment, especially for people not familiar with nginx and openresty like me. @spacewander @membphis
Or at least you should provide some guide to set up the development environment by docker.

it will be hard to set up the development environment

You can refer the installation guide of OpenResty / Test::Nginx.

I doubt people who can't even figure out how to setup the environment can develop it. We need some domain knowledge to solve the problem, setup the environment by yourself to make your hand dirty is a good place to gather those knowledge. RTFS/RTFM is the other way.

it will be hard to set up the development environment

You can refer the installation guide of OpenResty / Test::Nginx.

I doubt people who can't even figure out how to setup the environment can develop it. We need some domain knowledge to solve the problem, setup the environment by yourself to make your hand dirty is a good place to gather those knowledge. RTFS/RTFM is the other way.

Ok. Maybe add a link on README? It took me some time to find that how this test files are work. I have no idea what Test::Nginx is. If you give me some clue at first, it will save some time.