Two test failures

Bug #1153725 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aptdaemon
New
Undecided
Unassigned

Bug Description

Two new test failures with aptdaemon 1.0 in an Raring amd64 sbuild chroot. For now I think I will disable these tests so that we can get a working upload. I haven't yet checked to see whether these fail outside of a chroot build. I suspect some problem with starting the dbus daemon (btw, perhaps the tests should be switched to use Pitti's python-dbusmock: https://pypi.python.org/pypi/python-dbusmock/0.5 ?)

======================================================================
FAIL: test_high_trust_polkit_ok (tests.test_high_trust_repository_whitelist.HighTrustRepositoryIntegrationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/aptdaemon-_uG14S/aptdaemon-1.0/tests/test_high_trust_repository_whitelist.py", line 179, in test_high_trust_polkit_ok
    self.assertEqual(trans.exit, aptdaemon.enums.EXIT_SUCCESS)
AssertionError: dbus.String('exit-failed', variant_level=1) != 'exit-success'
    "dbus.String('exit-failed', variant_level=1) != 'exit-success'" = '%s != %s' % (safe_repr(dbus.String('exit-failed', variant_level=1)), safe_repr('exit-success'))
    "dbus.String('exit-failed', variant_level=1) != 'exit-success'" = self._formatMessage("dbus.String('exit-failed', variant_level=1) != 'exit-success'", "dbus.String('exit-failed', variant_level=1) != 'exit-success'")
>> raise self.failureException("dbus.String('exit-failed', variant_level=1) != 'exit-success'")

======================================================================
FAIL: test_read_high_trust_repository_whitelist_dir (tests.test_high_trust_repository_whitelist.HighTrustRepositoryTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/aptdaemon-_uG14S/aptdaemon-1.0/tests/test_high_trust_repository_whitelist.py", line 81, in test_read_high_trust_repository_whitelist_dir
    ("Debian-Security", "non-free", "^bar$")]))
AssertionError: Items in the second set but not the first:
('Ubuntu', 'main', 'foo.*')
('Debian-Security', 'non-free', '^bar$')
    """Fail immediately, with the given message."""
>> raise self.failureException("Items in the second set but not the first:\n('Ubuntu', 'main', 'foo.*')\n('Debian-Security', 'non-free', '^bar$')")

--------------------------------------------------------------------

Those are under Python 3.3.

This traceback higher up in the build log may provide a clue:

test_high_trust_polkit_ok (tests.test_high_trust_repository_whitelist.HighTrustRepositoryIntegrationTestCase) ... 15:01:43 AptDaemon [INFO]: Initializing daemon
15:01:43 AptDaemon.PackageKit [INFO]: Initializing PackageKit compat layer
15:01:45 AptDaemon [INFO]: InstallPackages() was called: dbus.Array([dbus.String('silly-base')], signature=dbus.Signature('s'))
ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/build/aptdaemon-_uG14S/aptdaemon-1.0/aptdaemon/client.py", line 652, in _on_property_changed
    error_handler=self._on_final_sync_done)
  File "/usr/lib/python3/dist-packages/defer/utils.py", line 107, in _deferable
    return func(*args, **kwargs)
  File "/build/aptdaemon-_uG14S/aptdaemon-1.0/aptdaemon/errors.py", line 200, in _convert_dbus_exception
    raise get_native_exception(error)
  File "/build/aptdaemon-_uG14S/aptdaemon-1.0/aptdaemon/errors.py", line 198, in _convert_dbus_exception
    return func(*args, **kwargs)
  File "/build/aptdaemon-_uG14S/aptdaemon-1.0/aptdaemon/client.py", line 684, in sync
    error_handler=error_handler)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 137, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 613, in call_async
    require_main_loop=require_main_loop)
dbus.exceptions.DBusException: Connection is disconnected - unable to make method call

Revision history for this message
Barry Warsaw (barry) wrote :

Actually, the test_read_high_trust_repository_whitelist_dir failure is caused by the tests/data/high-trust-repository-whitelist.d directory (which in the bzr trunk contains two symlinks) being missing from the upstream tarball.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.