mirror of
https://github.com/taigrr/systemctl.git
synced 2025-10-05 16:26:58 +08:00
adds table-driven tests
This commit is contained in:
3
util.go
3
util.go
@@ -62,6 +62,9 @@ func filterErr(stderr string) error {
|
||||
if matched, _ := regexp.MatchString(`Access denied`, stderr); matched {
|
||||
return ErrInsufficientPermissions
|
||||
}
|
||||
if matched, _ := regexp.MatchString(`DBUS_SESSION_BUS_ADDRESS`, stderr); matched {
|
||||
return ErrBusFailure
|
||||
}
|
||||
if matched, _ := regexp.MatchString(`Failed`, stderr); matched {
|
||||
return ErrUnspecified
|
||||
}
|
||||
|
Reference in New Issue
Block a user