Commit e2cdf1d4 authored by Stan Hu's avatar Stan Hu

Update background migration to use main instead of master

https://gitlab.com/gitlab-org/gitaly/-/merge_requests/3537 updated the
default branch to be `master` instead of `main`. This broke
`backfill_snippet_repositories_spec.rb` because it expected to create
commits in `master`, but the default branch was `main`.

Since `main` is now the default, we should target the initial commit for
that branch.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/336538
parent 0edb65c0
...@@ -105,7 +105,7 @@ module Gitlab ...@@ -105,7 +105,7 @@ module Gitlab
end end
def commit_attrs def commit_attrs
@commit_attrs ||= { branch_name: 'master', message: 'Initial commit' } @commit_attrs ||= { branch_name: 'main', message: 'Initial commit' }
end end
def create_commit(snippet) def create_commit(snippet)
......
...@@ -304,7 +304,7 @@ RSpec.describe Gitlab::BackgroundMigration::BackfillSnippetRepositories, :migrat ...@@ -304,7 +304,7 @@ RSpec.describe Gitlab::BackgroundMigration::BackfillSnippetRepositories, :migrat
end end
def blob_at(snippet, path) def blob_at(snippet, path)
raw_repository(snippet).blob_at('master', path) raw_repository(snippet).blob_at('main', path)
end end
def repository_exists?(snippet) def repository_exists?(snippet)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment