1. 14 Jun, 2020 1 commit
    • Stan Hu's avatar
      Fix order-dependent failure in bulk_insert_safe_spec.rb · c57061c4
      Stan Hu authored
      This would fail if `spec/models/concerns/bulk_insert_safe_spec.rb` and
      `spec/lib/gitlab/doctor/secrets_spec.rb` were run in order.
      
      The test failed because `bulk_insert_items` is a temporary table
      inserted by the test and dropped afterwards. However, the test also
      defines a `BulkInsertItem` class, which the GitLab Doctor secrets task
      uses to identify encrypted columns.
      
      To fix this, we change `BulkInsertItem` to inherit from
      `ActiveRecord::Base` instead of `ApplicationRecord`. We also make sure
      the first spec resets the model cache after dropping the table for
      completeness.
      
      Closes https://gitlab.com/gitlab-org/gitlab/-/issues/221784
      c57061c4
  2. 12 Jun, 2020 18 commits
  3. 11 Jun, 2020 21 commits