Commit Graph

26 Commits

Author SHA1 Message Date
038fbe1a17 fix(errors): prioritize permission errors over 'does not exist' warnings (#11)
filterErr checked 'does not exist' before 'Interactive authentication
required', so when systemd printed both (common for mask/unmask on
non-installed units as a non-root user), the wrong error was returned.

Reorder checks so permission, bus, and masked errors take priority over
existence warnings. Add tests covering mixed-stderr scenarios.

Also:
- CI: install and start nginx so user + root tests pass
- CI: run tests as both user and root for full coverage
- Bump Go 1.26 → 1.26.1
2026-03-06 11:38:03 -05:00
7bd5bef0cb fix broken error filtration 2023-06-28 23:43:20 -07:00
0075dc6b4d update to fix some tests, remove panics, and wrap errors 2023-06-17 23:18:28 -04:00
33828cf7b9 gofumpt against systemctl + add reenable 2022-10-23 23:26:52 -07:00
a32749ff89 Feature complete. Tests may change now, but API is frozen. 2021-05-17 00:46:59 -07:00
15305985ee Adds Start tests 2021-05-16 23:59:09 -07:00
3f10bbd46e Adds tests for Restart 2021-05-16 23:54:07 -07:00
ab748adefc Finishes Mask tests 2021-05-16 23:44:21 -07:00
125e4771dd cleans up comments, adds short testing options to more tests 2021-05-16 23:19:59 -07:00
54b77122a5 Stubs out remainder of tests 2021-05-16 23:08:42 -07:00
c7b2246a46 Finishes IsEnabled test cases 2021-05-16 23:01:23 -07:00
60ac9b7400 finishes IsActive tests 2021-05-16 22:36:11 -07:00
27c2ad77c8 improves IsActive testing 2021-05-16 22:32:24 -07:00
e941c90f0d Migrates many tests to errors_test 2021-05-16 22:00:50 -07:00
1ce6ec028a Add documentation and enable example 2021-05-16 18:04:21 -07:00
7325dda66d Export UserMode options 2021-05-16 15:53:54 -07:00
399f21f9b9 spellcheck on README 2021-05-15 20:22:48 -07:00
34f11bfcd1 Add masked unit tests for enable and disable 2021-05-15 20:02:05 -07:00
5865d30ada marked show tests as parallel 2021-05-15 19:19:23 -07:00
184bbc4936 Test disable function 2021-05-15 19:14:53 -07:00
aaa5f28ba7 adds table-driven tests 2021-05-15 17:39:41 -07:00
df9ea847d7 mark TestAllProperties as a long test 2021-05-15 14:26:43 -07:00
322e3458ac add property definitions and show test 2021-05-15 14:24:31 -07:00
8a7c865b5f adds option structs, ready for Show implementation 2021-05-15 13:49:34 -07:00
7bedb452e4 add success case to tests 2021-05-14 18:01:19 -07:00
feff1f6edd check stderr before reporting back error 1 2021-05-14 17:53:54 -07:00