tests: use manager_load_startable_unit_or_warn() to load units
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 12 Apr 2018 13:51:39 +0000 (15:51 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 16 Apr 2018 14:08:52 +0000 (16:08 +0200)
commitba412430a97ffbc02b3911c1b34db63e1524f7f9
tree3138435150b872c7a045be6d65001c4d4cee3787
parent4109ede7788c90e961b08c0da7d4da2d402931d7
tests: use manager_load_startable_unit_or_warn() to load units

Doing manager_load_unit() followed by UNIT_VTABLE(unit)->start(unit) would
result in an assertion failure in ->start() if the unit failed to load
properly. Something like this is okey-ish is tests, since the test units are
not expected to fail to load, but the reason for failure is clearer if we
fail immediately.
src/test/test-cgroup-mask.c
src/test/test-engine.c
src/test/test-execute.c
src/test/test-path.c
src/test/test-sched-prio.c