summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-03-15 10:22:22 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-03-15 10:22:22 +0000
commit9b2f9af1fcb1843f26e7270c1c35e24dee6eebea (patch)
treeeda6b979ba04f5e9e10cec55c76afe612c886e69
parent79ef2f8918612d4fe0dfa00e149b107c169ff868 (diff)
parent464ca33747ec3f2a4063795e18ab5888e429b334 (diff)
downloadgitlab-ce-9b2f9af1fcb1843f26e7270c1c35e24dee6eebea.tar.gz
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
-rw-r--r--spec/lib/gitlab/git/repository_spec.rb2
-rw-r--r--spec/support/seed_helper.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb
index bc139d5ef28..9c3a4571ce4 100644
--- a/spec/lib/gitlab/git/repository_spec.rb
+++ b/spec/lib/gitlab/git/repository_spec.rb
@@ -507,7 +507,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
describe "#remote_add" do
before(:all) do
@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
it "should add the remote" do
diff --git a/spec/support/seed_helper.rb b/spec/support/seed_helper.rb
index 07f81e9c4f3..f55fee28ff9 100644
--- a/spec/support/seed_helper.rb
+++ b/spec/support/seed_helper.rb
@@ -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")
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
if File.exist?(SEED_REPOSITORY_PATH)
@@ -25,7 +25,7 @@ module SeedHelper
end
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,
out: '/dev/null',
err: '/dev/null')
@@ -45,7 +45,7 @@ module SeedHelper
system(git_env, *%w(git branch -t feature origin/feature),
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')
end