summaryrefslogtreecommitdiff
path: root/spec/factories/ci/runners.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 09:45:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 09:45:46 +0000
commita7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch)
tree7452bd5c3545c2fa67a28aa013835fb4fa071baf /spec/factories/ci/runners.rb
parentee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff)
downloadgitlab-ce-a7b3560714b4d9cc4ab32dffcd1f74a284b93580.tar.gz
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
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