[SOLVED]I want to run kong's spec

I have follow tutorials (https://docs.konghq.com/install/source/) compile kong.
compiling OpenResty use the following compilation options:

     $ ./configure \
       --with-pcre-jit \
       --with-http_ssl_module \
       --with-http_realip_module \
       --with-http_stub_status_module \

but with many errors whit running bin/busted:

    Error → ./spec/helpers.lua @ 45
    suite spec/03-plugins/05-syslog/01-log_spec.lua
    ./spec/helpers.lua:45: could not find OpenResty 'nginx' executable. Kong requires version

And I Recompiling with following options from this page: https://github.com/Kong/kong/issues/2399

./configure  \
   --with-http_stub_status_module  \
   --with-http_v2_module  \
   --with-http_ssl_module  \ 

Can teach a simple tutorial on how to do unit testing?

@jiancaiHub, take a look at https://github.com/Kong/kong-vagrant.

1 Like

I want to know is there a docker image can to test kong’s spec by bin/busted?

This is relatively new which is why it’s not widely documented but I’d suggest trying the following development environment option: https://github.com/Kong/kong-build-tools#developing-kong which does effectively give a docker image with all the prerequisite testing tools (heads up first boot takes time)

1 Like