Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: removed unused errors from controller The ChecksController had mutliple functions which should return errors but no errors were returned. This commit fixes that and cleans up the tests that expected errors to be returned (but were never also used, as no error could ever be returned). Signed-off-by: Bruno Bressi <[email protected]> * chore: removed unused fields and errors Removed the unsued error field from the error struct and the error check that is no longer needed. * chore: add log entry There was no clear logging of why the error occurred, which made the log entry not that practical. * test: cleanup on controller_test.go Added a check for the reconcile method to actually check if the number of check's registered actually matches the expectation and fixed an error in the configuration of a check, which wasn't being registered. Removed the duplicate check registration case, because this is currently impossible to occur, as the Reconcile function already checks if a check is registered. * tests: remove test case Non-existent checks cannot be unregistered, as the function only gets called if an existing check fails to run, if the check is missing from the new config and finally when all the checks are being removed on shutdown. --------- Signed-off-by: Bruno Bressi <[email protected]>
- Loading branch information