Skip to content

Expand Repository Compare tests

Nailia Iskhakova requested to merge 401-expand-compare-tests into master

What does this MR do?

We consulted with Gitaly and Source Code teams and learned that Repository Compare functionality works the same for commits, tags and branches. Thus we supersede the Repository Compare Commits test with Repository Compare Branches. Here are some quotes for visibility:

We call the same code. On Gitlab Rails side we get commit ids before sending the request in Gitaly: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/git/compare.rb#L19

Performance Bar shows commits_between Gitaly request: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/new?utf8=%E2%9C%93&merge_request%5Bsource_project_id%5D=278964&merge_request%5Bsource_branch%5D=13-10-stable-ee&merge_request%5Btarget_project_id%5D=278964&merge_request%5Btarget_branch%5D=13-9-stable-ee from and to params are refs there. The params are just passed to the Git: https://gitlab.com/gitlab-org/gitaly/-/blob/d592d35ddc4ddcb33f1db44cc3520c10061ec93b/internal/gitaly/service/commit/between.go#L27

Related issues

Closes #401 (closed)

Checklist

  • Ensure test data for the new endpoint is representative. We recommend using large data ("edge cases") in performance tests. The impact of optimizations is more visible on the big numbers and large data may expose more performance bottlenecks.
  • Fill in @endpoint, @description, and @gpt_data_version tags with the information regarding the new test.
    • @gpt_data_version should be generally 1 unless you know the test is for data that's in a specific version.
  • Create a bug if the endpoint response time is above the performance main target (500 ms).
    • Specify created issue link under @issue tag.
  • Consider specifying the additional @flags:
    • unsafe - required for Unsafe tests. Ensure that data before and after the test is consistent.
    • search - labels Search related tests.
    • dash_url - labels Web tests with the check if the endpoint path has a dash \ redirect.
  • Web tests
Edited by Nailia Iskhakova

Merge request reports

Loading