Skip to content

Fix undercoverage on multi_store_spec

Sylvester Chin requested to merge sc1-multistore-spec-coverage into master

What does this MR do and why?

This MR updates the multi_store_specs.rb to cover the following lines

  • if @instance block in read_command and write_command. See explanation in !107328 (comment 1214144263)
  • else-block in define_method for all 3 classes of methods (READ_COMMANDS, WRITE_COMMANDS and PIPELINED_COMMANDS)

The MR also cleaned up multi_store.rb's rubocop violations.

Background: This MR's changes were originally in https://gitlab.com/gitlab-org/gitlab/-/jobs/3493564645 which caught uncovered lines of code. As the MR !107328 (merged) was simplified, I decided to separate the updated specs to keep the MR scoped its original intent.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports