diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-05-23 14:23:49 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-31 11:56:07 +0300 |
commit | 051f385e7e82130e6978cd3956e5c48fbdc83b2e (patch) | |
tree | 14284bade4be86bb80984127be91c30ada3de633 /spec/factories/ci | |
parent | 5c34c3fcd5f100b401b59d5a0f8e4fa0c899c8f5 (diff) |
Refactor validations and make runner factory by default to be instance-wide runner
Diffstat (limited to 'spec/factories/ci')
-rw-r--r-- | spec/factories/ci/runner_projects.rb | 2 | ||||
-rw-r--r-- | spec/factories/ci/runners.rb | 20 |
2 files changed, 6 insertions, 16 deletions
diff --git a/spec/factories/ci/runner_projects.rb b/spec/factories/ci/runner_projects.rb index f605e90ceed..ec15972c423 100644 --- a/spec/factories/ci/runner_projects.rb +++ b/spec/factories/ci/runner_projects.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :ci_runner_project, class: Ci::RunnerProject do - runner factory: :ci_runner + runner factory: [:ci_runner, :project] project end end diff --git a/spec/factories/ci/runners.rb b/spec/factories/ci/runners.rb index 9d106250d08..354aa0f65fc 100644 --- a/spec/factories/ci/runners.rb +++ b/spec/factories/ci/runners.rb @@ -3,37 +3,27 @@ FactoryBot.define do sequence(:description) { |n| "My runner#{n}" } platform "darwin" - is_shared false active true access_level :not_protected - runner_type :project_type - trait :online do - contacted_at Time.now - end + is_shared true + runner_type :instance_type - trait :shared do + trait :instance do is_shared true runner_type :instance_type end - trait :specific do - is_shared false - end - trait :group do + is_shared false runner_type :group_type end trait :project do + is_shared false runner_type :project_type end - trait :instance do - is_shared true - runner_type :instance_type - end - trait :inactive do active false end |