From e1e46504a1939aff927ae47508b0523a7305fb18 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 11 Jan 2026 04:22:04 +0900 Subject: container/check: return error backed by string type The struct turned out not necessary during initial implementation but was not unwrapped into its single string field. This change replaces it with the underlying string and removes the indirection. Signed-off-by: Ophestra --- internal/outcome/sppulse_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal') diff --git a/internal/outcome/sppulse_test.go b/internal/outcome/sppulse_test.go index 70fae9e9..f3f0635f 100644 --- a/internal/outcome/sppulse_test.go +++ b/internal/outcome/sppulse_test.go @@ -108,7 +108,7 @@ func TestSpPulseOp(t *testing.T) { call("lookupEnv", stub.ExpectArgs{"PULSE_COOKIE"}, "proc/nonexistent/cookie", nil), }, nil, nil, &hst.AppError{ Step: "locate PulseAudio cookie", - Err: &check.AbsoluteError{Pathname: "proc/nonexistent/cookie"}, + Err: check.AbsoluteError("proc/nonexistent/cookie"), }, nil, nil, nil, nil, nil}, {"cookie loadFile", func(bool, bool) outcomeOp { @@ -272,7 +272,7 @@ func TestDiscoverPulseCookie(t *testing.T) { call("verbose", stub.ExpectArgs{[]any{(*check.Absolute)(nil)}}, nil, nil), }}, &hst.AppError{ Step: "locate PulseAudio cookie", - Err: &check.AbsoluteError{Pathname: "proc/nonexistent/pulse-cookie"}, + Err: check.AbsoluteError("proc/nonexistent/pulse-cookie"), }}, {"success override", fCheckPathname, stub.Expect{Calls: []stub.Call{ @@ -286,7 +286,7 @@ func TestDiscoverPulseCookie(t *testing.T) { call("verbose", stub.ExpectArgs{[]any{(*check.Absolute)(nil)}}, nil, nil), }}, &hst.AppError{ Step: "locate PulseAudio cookie", - Err: &check.AbsoluteError{Pathname: "proc/nonexistent/home"}, + Err: check.AbsoluteError("proc/nonexistent/home"), }}, {"home stat", fCheckPathname, stub.Expect{Calls: []stub.Call{ @@ -321,7 +321,7 @@ func TestDiscoverPulseCookie(t *testing.T) { call("verbose", stub.ExpectArgs{[]any{(*check.Absolute)(nil)}}, nil, nil), }}, &hst.AppError{ Step: "locate PulseAudio cookie", - Err: &check.AbsoluteError{Pathname: "proc/nonexistent/xdg"}, + Err: check.AbsoluteError("proc/nonexistent/xdg"), }}, {"xdg stat", fCheckPathname, stub.Expect{Calls: []stub.Call{ -- cgit v1.3.1