-
-
Notifications
You must be signed in to change notification settings - Fork 110
Closed
Labels
Description
The point here is that using $result = $this->runner->run($configuration); the following should return false when a check failed: $result->wasSuccessful(). But in my test case, it returns true as in success. While it should return that the entire backup failed because the check failed, right?
Debugged it and boils down to this (I could be totally wrong though):
- Added a check to a backup
- Check fails and https://github.com/sebastianfeldmann/phpbu/blob/master/src/Result.php#L285 is called. This adds a failed check and also fails the backup.
- This only updates the backup, not the result which is used to determine a successful backup run! This is done here: https://github.com/sebastianfeldmann/phpbu/blob/master/src/Result.php#L133 where the value being used (
backupsFailed) is only updated when a backup itself failed (https://github.com/sebastianfeldmann/phpbu/blob/master/src/Result.php#L237). ThechecksFailedvalue is not being used anywhere except in the verbose CLI logging, I think?
In short, shouldn't wasSuccessful in the result class also check for failed checks, syncs, … instead of just backups?
Reactions are currently unavailable