internal/pipewire: implement SecurityContext::Create
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 2m26s
Test / Hakurei (push) Successful in 3m18s
Test / Hpkg (push) Successful in 4m16s
Test / Sandbox (race detector) (push) Successful in 4m22s
Test / Hakurei (race detector) (push) Successful in 5m12s
Test / Flake checks (push) Successful in 1m27s

This is finally the thing we are after.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-29 16:08:31 +09:00
parent 5a5c4705dd
commit de3fc7ba38
6 changed files with 157 additions and 52 deletions

View File

@@ -0,0 +1,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.sec.engine", Value: "org.flatpak"},
{Key: "pipewire.access", Value: "restricted"},
},
}, nil},
}.run(t)
}