debian-mirror-gitlab/spec/factories/clusters/agent_tokens.rb
2021-04-17 20:07:23 +05:30

11 lines
310 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :cluster_agent_token, class: 'Clusters::AgentToken' do
association :agent, factory: :cluster_agent
token_encrypted { Gitlab::CryptoHelper.aes256_gcm_encrypt(SecureRandom.hex(50)) }
sequence(:name) { |n| "agent-token-#{n}" }
end
end