integration-test: Use mock polkitd
authorMartin Pitt <martinpitt@gnome.org>
Mon, 18 Jun 2012 12:26:36 +0000 (14:26 +0200)
committerMartin Pitt <martinpitt@gnome.org>
Tue, 3 Jul 2012 08:51:05 +0000 (10:51 +0200)
commitb2cab3c2e3d8084fd542cc6de13e733bc04236fc
treea80fca740b3fb12d9800268818044a6f5015996f
parent313fd8f3334cd081d73fd5c6fab74531704a0a8b
integration-test: Use mock polkitd

Add src/tests/test_polkitd.py which provides a simple mock polkitd on a given
bus, as well as some convenience API. This allows test cases to precisely
control which actions get permitted and forbidden without having to assume
anything about the system polkit configuration, users, active/inactive consoles
etc. This is meant to go into polkit itself at some point.

Simplify integration-test to use test_polkitd and get rid of the uid changing
and calling of udisksctl.
src/tests/Makefile.am
src/tests/integration-test
src/tests/test_polkitd.py [new file with mode: 0755]