diff --git a/spec/nginx_spec.moon b/spec/nginx_spec.moon index 8dc754c..2d79503 100644 --- a/spec/nginx_spec.moon +++ b/spec/nginx_spec.moon @@ -117,12 +117,12 @@ describe "https://git.miti.sh", -> socket_owner = "nobody" basepath = Path.basepath debug.getinfo(1).short_src - Path.mkdir socket_dir - server = io.popen "moon %s"\format Path.join(basepath, socket_fname) + Path.exec "install", "-o", socket_owner, "-d", socket_dir + 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 "chown", "-R", socket_owner, socket_dir 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"