aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pipewire/securitycontext_test.go
blob: 26b1b29e65b400ac7e6b746bb45cf7acb639a687 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package pipewire_test

import (
	"testing"

	"hakurei.app/internal/pipewire"
)

func TestSecurityContextCreate(t *testing.T) {
	t.Parallel()

	encodingTestCases[pipewire.SecurityContextCreate, *pipewire.SecurityContextCreate]{
		{"sample", samplePWContainer[6][0][1], pipewire.SecurityContextCreate{
			ListenFd: 1 /* 21: duplicated from listen_fd */, CloseFd: 0, /* 20: duplicated from close_fd */
			Properties: &pipewire.SPADict{
				{Key: pipewire.PW_KEY_SEC_ENGINE, Value: "org.flatpak"},
				{Key: pipewire.PW_KEY_ACCESS, Value: "restricted"},
			},
		}, nil},
	}.run(t)
}