summaryrefslogtreecommitdiff
path: root/spec/factories/ci/runners.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/ci/runners.rb')
-rw-r--r--spec/factories/ci/runners.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/factories/ci/runners.rb b/spec/factories/ci/runners.rb
index 6665b7b76a0..18026412261 100644
--- a/spec/factories/ci/runners.rb
+++ b/spec/factories/ci/runners.rb
@@ -13,6 +13,7 @@ FactoryBot.define do
transient do
groups { [] }
projects { [] }
+ token_expires_at { nil }
end
after(:build) do |runner, evaluator|
@@ -25,6 +26,10 @@ FactoryBot.define do
end
end
+ after(:create) do |runner, evaluator|
+ runner.update!(token_expires_at: evaluator.token_expires_at) if evaluator.token_expires_at
+ end
+
trait :online do
contacted_at { Time.now }
end