aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/outcome/sppulse_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-02 12:22:32 +0900
committerOphestra <cat@gensokyo.uk>2025-11-02 12:22:32 +0900
commitf33aea9ff9c5eb678c6f1de59132aab69a59757e (patch)
treec59e2a93a3f8829146f18ad3079bc182f30d44c6 /internal/outcome/sppulse_test.go
parente7fc311d0b880e7ae44b97d406a309604b01dbac (diff)
internal/env: cleaner runtime dir fallback
This now places rundir inside the fallback runtime dir, so special case in internal/outcome is avoided. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome/sppulse_test.go')
-rw-r--r--internal/outcome/sppulse_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/outcome/sppulse_test.go b/internal/outcome/sppulse_test.go
index 9aecb198..84a53a7e 100644
--- a/internal/outcome/sppulse_test.go
+++ b/internal/outcome/sppulse_test.go
@@ -127,10 +127,10 @@ func TestSpPulseOp(t *testing.T) {
call("open", stub.ExpectArgs{"/proc/nonexistent/cookie"}, &stubOsFile{Reader: bytes.NewReader(sampleCookie)}, nil),
}, newI().
// state.ensureRuntimeDir
- Ensure(m(wantRunDirPath), 0700).
- UpdatePermType(system.User, m(wantRunDirPath), acl.Execute).
Ensure(m(wantRuntimePath), 0700).
UpdatePermType(system.User, m(wantRuntimePath), acl.Execute).
+ Ensure(m(wantRunDirPath), 0700).
+ UpdatePermType(system.User, m(wantRunDirPath), acl.Execute).
// state.runtime
Ephemeral(system.Process, m(wantRuntimeSharePath), 0700).
UpdatePerm(m(wantRuntimeSharePath), acl.Execute).
@@ -159,10 +159,10 @@ func TestSpPulseOp(t *testing.T) {
call("open", stub.ExpectArgs{"/proc/nonexistent/cookie"}, &stubOsFile{Reader: bytes.NewReader(sampleCookie[:len(sampleCookie)-0xe])}, nil),
}, newI().
// state.ensureRuntimeDir
- Ensure(m(wantRunDirPath), 0700).
- UpdatePermType(system.User, m(wantRunDirPath), acl.Execute).
Ensure(m(wantRuntimePath), 0700).
UpdatePermType(system.User, m(wantRuntimePath), acl.Execute).
+ Ensure(m(wantRunDirPath), 0700).
+ UpdatePermType(system.User, m(wantRunDirPath), acl.Execute).
// state.runtime
Ephemeral(system.Process, m(wantRuntimeSharePath), 0700).
UpdatePerm(m(wantRuntimeSharePath), acl.Execute).
@@ -192,10 +192,10 @@ func TestSpPulseOp(t *testing.T) {
call("open", stub.ExpectArgs{"/proc/nonexistent/cookie"}, &stubOsFile{Reader: bytes.NewReader(sampleCookie)}, nil),
}, newI().
// state.ensureRuntimeDir
- Ensure(m(wantRunDirPath), 0700).
- UpdatePermType(system.User, m(wantRunDirPath), acl.Execute).
Ensure(m(wantRuntimePath), 0700).
UpdatePermType(system.User, m(wantRuntimePath), acl.Execute).
+ Ensure(m(wantRunDirPath), 0700).
+ UpdatePermType(system.User, m(wantRunDirPath), acl.Execute).
// state.runtime
Ephemeral(system.Process, m(wantRuntimeSharePath), 0700).
UpdatePerm(m(wantRuntimeSharePath), acl.Execute).
@@ -222,10 +222,10 @@ func TestSpPulseOp(t *testing.T) {
call("verbose", stub.ExpectArgs{[]any{"cannot locate PulseAudio cookie (tried $PULSE_COOKIE, $XDG_CONFIG_HOME/pulse/cookie, $HOME/.pulse-cookie)"}}, nil, nil),
}, newI().
// state.ensureRuntimeDir
- Ensure(m(wantRunDirPath), 0700).
- UpdatePermType(system.User, m(wantRunDirPath), acl.Execute).
Ensure(m(wantRuntimePath), 0700).
UpdatePermType(system.User, m(wantRuntimePath), acl.Execute).
+ Ensure(m(wantRunDirPath), 0700).
+ UpdatePermType(system.User, m(wantRunDirPath), acl.Execute).
// state.runtime
Ephemeral(system.Process, m(wantRuntimeSharePath), 0700).
UpdatePerm(m(wantRuntimeSharePath), acl.Execute).