diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-08 07:34:54 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-08 07:38:47 +0900 |
| commit | 0c38fb7b6a17bed9392a4cf46fc752bc2de8eb18 (patch) | |
| tree | 44a762beb44193693ada3c97c368e4f12a4ec054 /hst/fsdaemon_test.go | |
| parent | 357cfcddeea14d6babacf7ae8f77e0bad7b24ee5 (diff) | |
hst: expose daemon as fs entry
This is slightly counterintuitive, but it turned out well under this framework since the daemon backs its target file.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/fsdaemon_test.go')
| -rw-r--r-- | hst/fsdaemon_test.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/hst/fsdaemon_test.go b/hst/fsdaemon_test.go new file mode 100644 index 00000000..1e78d62a --- /dev/null +++ b/hst/fsdaemon_test.go @@ -0,0 +1,29 @@ +package hst_test + +import ( + "testing" + + "hakurei.app/container" + "hakurei.app/hst" +) + +func TestFSDaemon(t *testing.T) { + t.Parallel() + + checkFs(t, []fsTestCase{ + {"nil", (*hst.FSDaemon)(nil), false, nil, nil, nil, "<invalid>"}, + {"zero", new(hst.FSDaemon), false, nil, nil, nil, "<invalid>"}, + + {"pipewire-pulse", &hst.FSDaemon{ + Target: m("/run/user/1971/pulse/native"), + Exec: m("/run/current-system/sw/bin/pipewire-pulse"), + Args: []string{"-v"}, + }, true, container.Ops{ + &container.DaemonOp{ + Target: m("/run/user/1971/pulse/native"), + Path: m("/run/current-system/sw/bin/pipewire-pulse"), + Args: []string{"-v"}, + }, + }, m("/run/user/1971/pulse/native"), nil, `daemon:/run/user/1971/pulse/native`}, + }) +} |
