mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 18:50:18 +01:00
tests: don't try to connect to the private socket
Even if we're running the tests as root we still want to use the mock
service instead of whatever version of daemon runs on the test host.
(cherry picked from commit 02e3d6c286)
This commit is contained in:
parent
2829fadcc1
commit
c099e9d43b
1 changed files with 3 additions and 2 deletions
|
|
@ -93,7 +93,8 @@ _nm_dbus_new_connection (GCancellable *cancellable, GError **error)
|
|||
GDBusConnection *connection = NULL;
|
||||
|
||||
/* If running as root try the private bus first */
|
||||
if (0 == geteuid ()) {
|
||||
if (0 == geteuid () && !g_test_initialized ()) {
|
||||
|
||||
GError *local = NULL;
|
||||
GDBusConnection *p;
|
||||
|
||||
|
|
@ -203,7 +204,7 @@ _nm_dbus_new_connection_async (GCancellable *cancellable,
|
|||
simple = g_simple_async_result_new (NULL, callback, user_data, _nm_dbus_new_connection_async);
|
||||
|
||||
/* If running as root try the private bus first */
|
||||
if (0 == geteuid ()) {
|
||||
if (0 == geteuid () && !g_test_initialized ()) {
|
||||
GDBusConnection *p;
|
||||
|
||||
if (cancellable) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue