mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-05 06:00:30 -04:00
testing: Use local tcp session for DBus to avoid leftover socket files
This commit is contained in:
parent
54351414fa
commit
2547b8d0ef
2 changed files with 16 additions and 1 deletions
15
data/test-dbus.conf
Normal file
15
data/test-dbus.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig>
|
||||
<type>session</type>
|
||||
<keep_umask/>
|
||||
<listen>tcp:host=localhost,port=0</listen>
|
||||
<auth>EXTERNAL</auth>
|
||||
<auth>ANONYMOUS</auth>
|
||||
<allow_anonymous/>
|
||||
<policy context="default">
|
||||
<allow send_destination="*" eavesdrop="true"/>
|
||||
<allow eavesdrop="true"/>
|
||||
<allow own="*"/>
|
||||
</policy>
|
||||
</busconfig>
|
|
@ -112,7 +112,7 @@ pub struct TestHandle {
|
|||
impl MockDBus {
|
||||
pub async fn new() -> Result<MockDBus> {
|
||||
let mut process = Command::new("/usr/bin/dbus-daemon")
|
||||
.args(["--session", "--nofork", "--print-address"])
|
||||
.args(["--nofork", "--print-address", "--config-file=data/test-dbus.conf"])
|
||||
.stdout(Stdio::piped())
|
||||
.spawn()?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue