Install opens up COMFY_DIR for the sandboxed service: ACL grant on Windows, BindPaths on Linux
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func TestRenderUnit(t *testing.T) {
|
||||
unit := renderUnit("/var/lib/gpu-turnstile/gpu-turnstile", "/etc/gpu-turnstile.env")
|
||||
unit := renderUnit("/var/lib/gpu-turnstile/gpu-turnstile", "/etc/gpu-turnstile.env", "")
|
||||
for _, want := range []string{
|
||||
"Type=notify",
|
||||
"WatchdogSec=30s",
|
||||
@@ -26,4 +26,12 @@ func TestRenderUnit(t *testing.T) {
|
||||
t.Fatalf("unit missing %q:\n%s", want, unit)
|
||||
}
|
||||
}
|
||||
if strings.Contains(unit, "BindPaths") {
|
||||
t.Fatalf("unit without COMFY_DIR must not bind anything:\n%s", unit)
|
||||
}
|
||||
|
||||
unit = renderUnit("/var/lib/gpu-turnstile/gpu-turnstile", "/etc/gpu-turnstile.env", "/home/gpu/ComfyUI")
|
||||
if !strings.Contains(unit, "BindPaths=/home/gpu/ComfyUI\n") {
|
||||
t.Fatalf("unit with COMFY_DIR must bind it:\n%s", unit)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user