users-admin not testable with ldtp and policykit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ldtp (Ubuntu) |
Triaged
|
Low
|
Unassigned | ||
Natty |
Won't Fix
|
Undecided
|
Unassigned | ||
system-tools-backends (Ubuntu) |
Triaged
|
Low
|
Unassigned | ||
Natty |
Won't Fix
|
High
|
Unassigned |
Bug Description
Binary package hint: gnome-system-tools
While running an automated test, the tools hang when following these steps:
1. Open users-admin
2. Click Add (user)
* While trying to interact with authentication dialog, the scripts hang. This does not occur with the other apps we test that require authentication with polkit
Be patient for the timeout error dialog to display
Enable accessibility and install python-ldtp
Simple Test Script:
import ldtp
import sys
# must have a11y enabled
# arg1 is your password
password = sys.argv[1]
ldtp.launchapp(
ldtp.click(
dlgAuthenticate = 'dlgAthenticate'
ldtp.waittillgu
ldtp.settextval
ldtp.click(
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: gnome-system-tools 2.32.0-0ubuntu6
ProcVersionSign
Uname: Linux 2.6.38-7-generic i686
Architecture: i386
Date: Wed Mar 23 12:00:39 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110302)
ProcEnviron:
LANGUAGE=en_US:en
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: gnome-system-tools
UpgradeStatus: Upgraded to natty on 2011-03-22 (1 days ago)
summary: |
- users-admin breaks with polkit + users-admin not testable with ldtp and policykit |
description: | updated |
description: | updated |
Yeah, this is because of the way the system- tools-backends and liboobs are designed: oobs_object_ authenticate( ) is a synchronous call. I don't think this will be fixed since the gnome-system-tools are deprecated in favor of GNOME3's control center - unless you redesign the whole API *or* introduce a hack so that users-admin first authenticates via a direct call to PolicyKit (action org.freedesktop .systemtoolsbac kends.set) from around src/user- settings. c:1050. But that would only work for that precise action and would be a ugly hack. Not sure it's worth it...
Easier would be to setup your test machine so that action org.freedesktop .systemtoolsbac kends.set is allowed without authentication.