aboutsummaryrefslogtreecommitdiffhomepage
path: root/dbus/export_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-04-16 23:10:04 +0900
committerOphestra <cat@gensokyo.uk>2025-04-16 23:35:17 +0900
commit5979d8b1e0fc4249fb73de9b0ba099bae7707214 (patch)
treeec3e9c859007005889cfad99158d3fd401587bf1 /dbus/export_test.go
parente587112e6382aae80d46097c2e7636e22abdf917 (diff)
dbus: clean up wrapper implementation
The dbus proxy wrapper haven't been updated much ever since the helper interface was introduced. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'dbus/export_test.go')
-rw-r--r--dbus/export_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/dbus/export_test.go b/dbus/export_test.go
index d42fde51..574a4a73 100644
--- a/dbus/export_test.go
+++ b/dbus/export_test.go
@@ -1,13 +1,13 @@
package dbus
-import "io"
+import (
+ "context"
+ "io"
+)
-// CompareTestNew provides TestNew with comparison access to unexported Proxy fields.
-func (p *Proxy) CompareTestNew(session, system [2]string) bool {
- return session == p.session && system == p.system
-}
-
-// AccessTestProxySeal provides TestProxy_Seal with access to unexported Proxy seal field.
-func (p *Proxy) AccessTestProxySeal() io.WriterTo {
- return p.seal
+// NewDirect returns a new instance of [Proxy] with its sandbox disabled.
+func NewDirect(ctx context.Context, final *Final, output io.Writer) *Proxy {
+ p := New(ctx, final, output)
+ p.useSandbox = false
+ return p
}