diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-05-07 15:15:57 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-07 15:15:57 +0000 |
commit | d0cbef7e8f4faf76b9a528a4629517f29b8c265b (patch) | |
tree | 90610e3e78f17389bcd601f43b9fbe29723b6034 /spec/factories/projects.rb | |
parent | 32009764527a89708e89fb547ce4086e75cd04d0 (diff) | |
parent | 2a279143ebbccdbc180619cb29936d35d11b226d (diff) | |
download | gitlab-ce-d0cbef7e8f4faf76b9a528a4629517f29b8c265b.tar.gz |
Merge branch '42099-port-push-mirroring-to-ce-ce-port-v-2' into 'master'
CE backport of Backports Push Mirrors to CE
Closes #42099
See merge request gitlab-org/gitlab-ce!18715
Diffstat (limited to 'spec/factories/projects.rb')
-rw-r--r-- | spec/factories/projects.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 9ab57af1c60..d129815aeac 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -183,6 +183,17 @@ FactoryBot.define do end end + trait :remote_mirror do + transient do + remote_name "remote_mirror_#{SecureRandom.hex}" + url "http://foo.com" + enabled true + end + after(:create) do |project, evaluator| + project.remote_mirrors.create!(url: evaluator.url, enabled: evaluator.enabled) + end + end + trait :stubbed_repository do after(:build) do |project| allow(project).to receive(:empty_repo?).and_return(false) |