Add tests for nginx.conf directives #1
@ -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"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user