Skip to content
代码片段 群组 项目
该项目从 https://gitlab.com/gitlab-org/gitlab.git 镜像。 拉取镜像更新于
  1. 10月 19, 2022
  2. 10月 15, 2022
    • Omar Qunsul's avatar
      Ensure schemas are up-to-date after migration tests complete · a93da703
      Omar Qunsul 创作于
      If a CI migration leaves the database behind the current database
      schema, we need to ensure that the schema is brought up-to-date after
      the migrations run to prevent other tests from starting from an
      inconsistent state.
      
      This commit consolidates the database cleanup for multiple databases
      by ensuring:
      
      1. After a migration context is complete, either recreate the
      databases (if the number of columns approaches the max) or migrate all
      the schemas back to the latest and drop all data from both databases.
      
      2. After a migration example runs, delete any leftover data for that
      specific database.  If a CI migration leaves the database behind the
      current database schema, we need to ensure that the schema is brought
      up-to-date after the migrations run to prevent putting other tests in
      an inconsistent state.
      
      Related MR:
      https://gitlab.com/gitlab-org/gitlab/-/merge_requests/100233
      
      Closes https://gitlab.com/gitlab-org/gitlab/-/issues/377796
      
      Changelog: fixed
      a93da703
  3. 9月 29, 2022
    • Stan Hu's avatar
      Ensure PostgreSQL versions are memoized at start of tests · 3a83e8e2
      Stan Hu 创作于
      Some GitLab classes, such as `Gitlab::Database::AsWithMaterialized`,
      need to check the PostgreSQL version to determine whether certain
      keywords can be used. We have some specs that specify exact query
      types or check for N+1 queries that might be thrown off by an extra
      `SELECT VERSION()` call. To ensure this doesn't happen, retrieve the
      version at the beginning of the test.
      
      Note that the initializer `config/initializers/1_postgresql_only.rb`
      already attempts to check the PostgreSQL version, but the result isn't
      memoized properly for callers that use
      `ApplicationRecord.database.version`.
      
      This came up in
      https://gitlab.com/gitlab-org/gitlab/-/merge_requests/99097#note_1118427731.
      
      Changelog: changed
      3a83e8e2
  4. 7月 20, 2022
  5. 11月 22, 2021
  6. 11月 19, 2021
    • pbair's avatar
      Only mock ci connections in single db mode · 6eeb7b3e
      pbair 创作于
      Change `mock_ci_connection` to only setup a mocked
      `Ci::ApplicationRecord` connection when running in a single database
      mode. When running with multiple databases, we can use the actual
      `Ci::ApplicationRecord` connection.
      6eeb7b3e
  7. 11月 17, 2021
  8. 11月 10, 2021
  9. 9月 23, 2021
  10. 9月 15, 2021
加载中