Add tests for nginx.conf directives #1

Merged
ccm merged 26 commits from ccm-test-nginx-directives into trunk 2025-06-14 21:54:22 +00:00
Showing only changes of commit 02d17d1b11 - Show all commits

View File

@ -117,12 +117,12 @@ describe "https://git.miti.sh", ->
socket_owner = "nobody" socket_owner = "nobody"
basepath = Path.basepath debug.getinfo(1).short_src basepath = Path.basepath debug.getinfo(1).short_src
Path.mkdir socket_dir Path.exec "install", "-o", socket_owner, "-d", socket_dir
server = io.popen "moon %s"\format Path.join(basepath, socket_fname) cmd = "su -s /bin/bash -c 'moon %s' %s"
server = io.popen cmd\format Path.join(basepath, socket_fname), socket_owner
Path.exec "sleep", "0.1" Path.exec "sleep", "0.1"
Path.exec "chown", "-R", socket_owner, socket_dir
result = Path.read_exec "find", socket_dir, "-type", "s", "-ls" result = Path.read_exec "find", socket_dir, "-type", "s", "-ls"
assert.truthy result\match "nobody%s+root.+" .. Path.join(socket_dir, "gitea.socket") assert.truthy result\match "nobody%s+nogroup.+" .. Path.join(socket_dir, "gitea.socket")
req "https://git.miti.sh" req "https://git.miti.sh"