Add tests for nginx.conf directives (#1)
Adds tests to make sure all the `nginx.conf` directives (the redirects and rewrites and such) are all correct. - Uses the `busted` framework - The tests are run in a Docker container by the bash script `test.sh` - Self-signed certs are generated in `Dockerfile` for all the domain names - Adds new `Makefile` commands: `test`, `image-build` and `image-rm` Reviewed-on: #1 Co-authored-by: Catalin Mititiuc <webdevcat@proton.me> Co-committed-by: Catalin Mititiuc <webdevcat@proton.me>
This commit is contained in:
14
spec/unixstreamsrvr.moon
Normal file
14
spec/unixstreamsrvr.moon
Normal file
@@ -0,0 +1,14 @@
|
||||
-- modified from
|
||||
-- https://github.com/lunarmodules/luasocket/blob/4844a48fbf76b0400fd7b7e4d15d244484019df1/test/unixstreamsrvr.lua
|
||||
socket = require "socket"
|
||||
socket.unix = require "socket.unix"
|
||||
u = assert socket.unix.stream!
|
||||
assert u\bind "/run/gitea/gitea.socket"
|
||||
assert u\listen!
|
||||
assert u\settimeout 1
|
||||
c = assert u\accept!
|
||||
|
||||
while true
|
||||
m = assert c\receive!
|
||||
break if m == ""
|
||||
print m
|
||||
Reference in New Issue
Block a user