Commit Graph

58 Commits

Author SHA1 Message Date
Philip Withnall a2c2965d25 tests: Add comprehensive tests for libeos-parental-controls
These test get/set behaviour of EpcAppFilter, GAppInfo support, and
various error handling paths and corner cases.

With these tests, coverage of app-filter.c is:
 • Lines: 97%
 • Functions: 100%
 • Branches: 57.5%

The branch coverage is not correctly reported, as it factors in the
failure branches for g_return_if_fail() precondition assertions, which
we deliberately do not test. With those branches manually excluded,
branch coverage is around 89% instead.

This adds libglib-testing as a subproject dependency, for its
GtDBusQueue. It adds gio-unix-2.0 as a dependency of the app-filter
tests, in order to be able to construct GDesktopAppInfos.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24004
2018-12-20 13:01:01 +00:00
Philip Withnall 318b35e3da libeos-parental-controls: Add placeholder unit tests
This commit is mostly to put the test framework in place, and create a
placeholder test library for libeos-parental-controls for packaging.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T23859
2018-10-06 00:48:36 +01:00
Philip Withnall 63d229e653 eos-parental-controls-client: Add simple client program
This allows querying of the parental controls for a given user (or the
current user).

Includes documentation but no tests yet.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://phabricator.endlessm.com/T23859
2018-10-03 14:53:14 +01:00
Philip Withnall 1235c275eb build: Add gobject-introspection support
Verified to all be introspectable.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T23859
2018-10-03 14:53:14 +01:00
Philip Withnall 9b8cef7697 build: Add a bug URI in a FIXME comment
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T23859
2018-10-03 14:53:14 +01:00
Philip Withnall fe0c597774 libeos-parental-controls: Initial implementation of library
This allows the app filter to be queried, and includes all the basic
parts of a shared library. Introspection and unit tests are to follow.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://phabricator.endlessm.com/T23859
2018-10-03 14:53:14 +01:00
Philip Withnall b97d101db6 po: Add basic translation support
The messages in the polkit policy file need translating.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T23858
2018-09-28 10:12:53 +02:00
Philip Withnall 79a4c41eee accounts-service: Add accounts service vendor extension for app filter
Use accounts service’s vendor extension support for storing the app
filter per user, in a way that persists and which access to is
controlled by polkit (so writes can be restricted to administrators).

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T23858
2018-09-28 10:12:53 +02:00