aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst/fsdaemon_test.go
blob: 1e78d62abcaea80d418bb4a6a76e4ddc4a2d24a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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`},
	})
}