|
|
57c460 |
From 5887cf5b5d0cded422b883052d4a8c3cf5d5f5fa Mon Sep 17 00:00:00 2001
|
|
|
57c460 |
From: Martin Pitt <martinpitt@users.noreply.github.com>
|
|
|
57c460 |
Date: Tue, 24 Oct 2017 21:13:07 +0200
|
|
|
57c460 |
Subject: [PATCH 1/6] test: Fix test-dbus to work without a system bus (#7952)
|
|
|
57c460 |
|
|
|
57c460 |
The last test in `TESTS=dist/base1/test-dbus` hangs eternally if there
|
|
|
57c460 |
is no system D-Bus running:
|
|
|
57c460 |
|
|
|
57c460 |
```
|
|
|
57c460 |
PASS: dist/base1/test-dbus.html 187 - receive writable fd: fd received and not writable
|
|
|
57c460 |
cockpit-bridge-Message: 1:58: Could not connect: No such file or directory
|
|
|
57c460 |
cockpit-bridge-Message: 1:60: (null)
|
|
|
57c460 |
cockpit-bridge-Message: 1:59: Could not connect: No such file or directory
|
|
|
57c460 |
cockpit-bridge-Message: 1:61: Could not connect: No such file or directory
|
|
|
57c460 |
Could not connect: No such file or directory
|
|
|
57c460 |
(null)
|
|
|
57c460 |
Could not connect: No such file or directory
|
|
|
57c460 |
Could not connect: No such file or directory
|
|
|
57c460 |
```
|
|
|
57c460 |
|
|
|
57c460 |
This happens when running tests in mock or in a docker container.
|
|
|
57c460 |
|
|
|
57c460 |
Use the session bus to avoid this and make fewer assumptions about the
|
|
|
57c460 |
host system.
|
|
|
57c460 |
|
|
|
57c460 |
Closes #7952
|
|
|
57c460 |
---
|
|
|
57c460 |
src/base1/test-dbus.js | 8 ++++----
|
|
|
57c460 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
57c460 |
|
|
|
57c460 |
diff --git a/src/base1/test-dbus.js b/src/base1/test-dbus.js
|
|
|
57c460 |
index a3f42e3..cf04ed5 100644
|
|
|
57c460 |
--- a/src/base1/test-dbus.js
|
|
|
57c460 |
+++ b/src/base1/test-dbus.js
|
|
|
57c460 |
@@ -705,10 +705,10 @@ QUnit.asyncTest("internal dbus bus none with address", function() {
|
|
|
57c460 |
QUnit.asyncTest("separate dbus connections for channel groups", function() {
|
|
|
57c460 |
assert.expect(4);
|
|
|
57c460 |
|
|
|
57c460 |
- var channel1 = cockpit.channel({ payload: 'dbus-json3', group: 'foo' });
|
|
|
57c460 |
- var channel2 = cockpit.channel({ payload: 'dbus-json3', group: 'bar' });
|
|
|
57c460 |
- var channel3 = cockpit.channel({ payload: 'dbus-json3', group: 'foo' });
|
|
|
57c460 |
- var channel4 = cockpit.channel({ payload: 'dbus-json3', group: 'baz' });
|
|
|
57c460 |
+ var channel1 = cockpit.channel({ payload: 'dbus-json3', group: 'foo', bus: 'session' });
|
|
|
57c460 |
+ var channel2 = cockpit.channel({ payload: 'dbus-json3', group: 'bar', bus: 'session' });
|
|
|
57c460 |
+ var channel3 = cockpit.channel({ payload: 'dbus-json3', group: 'foo', bus: 'session' });
|
|
|
57c460 |
+ var channel4 = cockpit.channel({ payload: 'dbus-json3', group: 'baz', bus: 'session' });
|
|
|
57c460 |
|
|
|
57c460 |
cockpit.all([
|
|
|
57c460 |
channel1.wait(), channel2.wait(), channel3.wait(), channel4.wait()
|
|
|
57c460 |
--
|
|
|
57c460 |
2.14.3
|
|
|
57c460 |
|