diff options
author | Robert Tari <robert@tari.in> | 2021-11-03 02:58:43 +0100 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-11-03 02:58:43 +0100 |
commit | 838e2ff71472e0ae70ea0f62a614472f434bd2df (patch) | |
tree | 3512795b09ce9fb2833ab53efbf35d8c6c113d6d | |
parent | 3834947c6828ec4bcea7d941b1c28a8b9318f829 (diff) | |
download | ayatana-indicator-session-838e2ff71472e0ae70ea0f62a614472f434bd2df.tar.gz ayatana-indicator-session-838e2ff71472e0ae70ea0f62a614472f434bd2df.tar.bz2 ayatana-indicator-session-838e2ff71472e0ae70ea0f62a614472f434bd2df.zip |
Use Ayatana as mock user
-rw-r--r-- | src/backend-dbus/users.c | 4 | ||||
-rw-r--r-- | tests/backend-dbus/test-users.cc | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/backend-dbus/users.c b/src/backend-dbus/users.c index e6910c6..f19e1e8 100644 --- a/src/backend-dbus/users.c +++ b/src/backend-dbus/users.c @@ -1,8 +1,10 @@ /* * Copyright 2013 Canonical Ltd. + * Copyright 2021 Robert Tari * * Authors: * Charles Kerr <charles.kerr@canonical.com> + * Robert Tari <robert@tari.in> * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -397,7 +399,7 @@ on_login1_manager_session_list_ready (GObject * o, { set_active_uid (self, uid); - if ((uid==999) && !g_strcmp0 (user_name, "ubuntu")) + if ((uid==999) && !g_strcmp0 (user_name, "ayatana")) is_live_session = TRUE; } diff --git a/tests/backend-dbus/test-users.cc b/tests/backend-dbus/test-users.cc index dccacbb..2a2a354 100644 --- a/tests/backend-dbus/test-users.cc +++ b/tests/backend-dbus/test-users.cc @@ -1,8 +1,10 @@ /* * Copyright 2013 Canonical Ltd. + * Copyright 2021 Robert Tari * * Authors: * Charles Kerr <charles.kerr@canonical.com> + * Robert Tari <robert@tari.in> * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -366,7 +368,7 @@ TEST_F (Users, LiveSession) ASSERT_FALSE (b); // now add the criteria for a live session - MockUser * live_user = new MockUser (loop, conn, "ubuntu", "Ubuntu", 1, 999); + MockUser * live_user = new MockUser (loop, conn, "ayatana", "Ayatana", 1, 999); live_user->set_system_account (true); accounts->add_user (live_user); const int session_tag = login1_manager->add_session (login1_seat, live_user); |