Migrate TestGetEvents into a unit and a CLI test

Docker-DCO-1.1-Signed-off-by: Guilherme Salgado <gsalgado@gmail.com> (github: gsalgado)
Merge pull request #6216 from gsalgado/convert-integration-tests

Convert integration/api_test:TestGetEvents into a unit test and a CLI test