Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-07-06 08:38:24 +0300
committerShinya Maeda <shinya@gitlab.com>2018-07-06 08:38:24 +0300
commit25bd5413200c9cd9368c753e2752f07735604547 (patch)
treec4cc75a53face6a6d0da8adca9a3994d3cc688b5 /spec/factories
parentb025e89e08888f3b393108f984a25c209526491b (diff)
parent969b7c565c6fe5cdfc54830d1da35f254ddaf530 (diff)
Merge branch 'master' into build-chunks-on-object-storage
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/ci/builds.rb6
-rw-r--r--spec/factories/ci/runners.rb4
-rw-r--r--spec/factories/todos.rb4
3 files changed, 8 insertions, 6 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb
index 4acc008ed38..83cb4750741 100644
--- a/spec/factories/ci/builds.rb
+++ b/spec/factories/ci/builds.rb
@@ -248,5 +248,11 @@ FactoryBot.define do
failed
failure_reason 2
end
+
+ trait :with_runner_session do
+ after(:build) do |build|
+ build.build_runner_session(url: 'ws://localhost')
+ end
+ end
end
end
diff --git a/spec/factories/ci/runners.rb b/spec/factories/ci/runners.rb
index 6fb621b5e51..347e4f433e2 100644
--- a/spec/factories/ci/runners.rb
+++ b/spec/factories/ci/runners.rb
@@ -6,7 +6,6 @@ FactoryBot.define do
active true
access_level :not_protected
- is_shared true
runner_type :instance_type
trait :online do
@@ -14,12 +13,10 @@ FactoryBot.define do
end
trait :instance do
- is_shared true
runner_type :instance_type
end
trait :group do
- is_shared false
runner_type :group_type
after(:build) do |runner, evaluator|
@@ -28,7 +25,6 @@ FactoryBot.define do
end
trait :project do
- is_shared false
runner_type :project_type
after(:build) do |runner, evaluator|
diff --git a/spec/factories/todos.rb b/spec/factories/todos.rb
index 94f8caedfa6..14486c80341 100644
--- a/spec/factories/todos.rb
+++ b/spec/factories/todos.rb
@@ -1,8 +1,8 @@
FactoryBot.define do
factory :todo do
project
- author { project.creator }
- user { project.creator }
+ author { project&.creator || user }
+ user { project&.creator || user }
target factory: :issue
action { Todo::ASSIGNED }