diff options
Diffstat (limited to 'spec/factories/projects.rb')
-rw-r--r-- | spec/factories/projects.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 981f10e8260..c345fa0c8b4 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -49,6 +49,8 @@ FactoryBot.define do forward_deployment_enabled { nil } restrict_user_defined_variables { nil } ci_job_token_scope_enabled { nil } + runner_token_expiration_interval { nil } + runner_token_expiration_interval_human_readable { nil } end after(:build) do |project, evaluator| @@ -92,6 +94,8 @@ FactoryBot.define do project.keep_latest_artifact = evaluator.keep_latest_artifact unless evaluator.keep_latest_artifact.nil? project.restrict_user_defined_variables = evaluator.restrict_user_defined_variables unless evaluator.restrict_user_defined_variables.nil? project.ci_job_token_scope_enabled = evaluator.ci_job_token_scope_enabled unless evaluator.ci_job_token_scope_enabled.nil? + project.runner_token_expiration_interval = evaluator.runner_token_expiration_interval unless evaluator.runner_token_expiration_interval.nil? + project.runner_token_expiration_interval_human_readable = evaluator.runner_token_expiration_interval_human_readable unless evaluator.runner_token_expiration_interval_human_readable.nil? if evaluator.import_status import_state = project.import_state || project.build_import_state @@ -101,6 +105,9 @@ FactoryBot.define do import_state.last_error = evaluator.import_last_error import_state.save! end + + # simulating ::Projects::ProcessSyncEventsWorker because most tests don't run Sidekiq inline + project.create_ci_project_mirror!(namespace_id: project.namespace_id) unless project.ci_project_mirror end trait :public do |