Unregister command unit tests
What does this MR do?
Add unit tests for unregister command.
I want to refactor the code in the command to have logging in one place, so that internal methods/functions could return errors which are easier to test. Right now in the code, we just use log.Fataln to exit when there is an error, which makes it difficult to test the error conditions.
These tests will help me refactor with confidence.
Why was this MR needed?
No existing unit tests for it.
What's the best way to test this MR?
go test ./commands/...