Lbhardwaj/refactor/unregister command methods

What does this MR do?

Refactor the unregister command methods to increase the testability of the method.

Logging a fatal error makes the code difficult to test. This MR refactors the code to return an error which can be tested, fatal errors are now logged in execute.

Why was this MR needed?

For better testability of methods.

What's the best way to test this MR?

go test -race ./commands/...

What are the relevant issue numbers?

This is a follow up MR to !5738 (merged)

Merge request reports

Loading