Commit 9b2f9af1 authored by Sean McGivern's avatar Sean McGivern

Merge branch '27551-use-dev-mirror-of-gitlab-git-test-on-dev' into 'master'

Allow to override GITLAB_GIT_TEST_REPO_URL to specify a different gitlab-git-test repo

Closes #27551

See merge request !9945
parents 79ef2f89 464ca337
...@@ -507,7 +507,7 @@ describe Gitlab::Git::Repository, seed_helper: true do ...@@ -507,7 +507,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
describe "#remote_add" do describe "#remote_add" do
before(:all) do before(:all) do
@repo = Gitlab::Git::Repository.new(TEST_MUTABLE_REPO_PATH) @repo = Gitlab::Git::Repository.new(TEST_MUTABLE_REPO_PATH)
@repo.remote_add("new_remote", SeedHelper::GITLAB_URL) @repo.remote_add("new_remote", SeedHelper::GITLAB_GIT_TEST_REPO_URL)
end end
it "should add the remote" do it "should add the remote" do
......
...@@ -7,7 +7,7 @@ TEST_MUTABLE_REPO_PATH = File.join(SEED_REPOSITORY_PATH, "mutable-repo.git") ...@@ -7,7 +7,7 @@ TEST_MUTABLE_REPO_PATH = File.join(SEED_REPOSITORY_PATH, "mutable-repo.git")
TEST_BROKEN_REPO_PATH = File.join(SEED_REPOSITORY_PATH, "broken-repo.git") TEST_BROKEN_REPO_PATH = File.join(SEED_REPOSITORY_PATH, "broken-repo.git")
module SeedHelper module SeedHelper
GITLAB_URL = "https://gitlab.com/gitlab-org/gitlab-git-test.git".freeze GITLAB_GIT_TEST_REPO_URL = ENV.fetch('GITLAB_GIT_TEST_REPO_URL', 'https://gitlab.com/gitlab-org/gitlab-git-test.git').freeze
def ensure_seeds def ensure_seeds
if File.exist?(SEED_REPOSITORY_PATH) if File.exist?(SEED_REPOSITORY_PATH)
...@@ -25,7 +25,7 @@ module SeedHelper ...@@ -25,7 +25,7 @@ module SeedHelper
end end
def create_bare_seeds def create_bare_seeds
system(git_env, *%W(#{Gitlab.config.git.bin_path} clone --bare #{GITLAB_URL}), system(git_env, *%W(#{Gitlab.config.git.bin_path} clone --bare #{GITLAB_GIT_TEST_REPO_URL}),
chdir: SEED_REPOSITORY_PATH, chdir: SEED_REPOSITORY_PATH,
out: '/dev/null', out: '/dev/null',
err: '/dev/null') err: '/dev/null')
...@@ -45,7 +45,7 @@ module SeedHelper ...@@ -45,7 +45,7 @@ module SeedHelper
system(git_env, *%w(git branch -t feature origin/feature), system(git_env, *%w(git branch -t feature origin/feature),
chdir: TEST_MUTABLE_REPO_PATH, out: '/dev/null', err: '/dev/null') chdir: TEST_MUTABLE_REPO_PATH, out: '/dev/null', err: '/dev/null')
system(git_env, *%W(#{Gitlab.config.git.bin_path} remote add expendable #{GITLAB_URL}), system(git_env, *%W(#{Gitlab.config.git.bin_path} remote add expendable #{GITLAB_GIT_TEST_REPO_URL}),
chdir: TEST_MUTABLE_REPO_PATH, out: '/dev/null', err: '/dev/null') chdir: TEST_MUTABLE_REPO_PATH, out: '/dev/null', err: '/dev/null')
end end
......
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