Refactor GeoNodeStatus to make more testable and enable cop

From https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/12183#note_166390826:

We don't appear to have test coverage for #load_primary_data or load_secondary_data ..

Yeah, the structure of GeoNodeStatus and its spec is kind of unusual. I think it actually has ok coverage, in an indirect way, but it could be refactored to be more testable.

Also, I disabled a Metrics/AbcSize cop since I'd rather not resolve it in a regression fix: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/12183/diffs#c6912cd15dffdbdb3b3075e5920cba9d0f910c37_211_211

To do

  • Refactor to make more testable
  • Refactor to remove disable of Metrics/AbcSize cop
  • Improve test coverage
    • Exercise everything relevant in the context of both primary and secondary
    • Test all public methods
Edited May 03, 2019 by Michael Kozono
Assignee Loading
Time tracking Loading