Welcome to mirror list, hosted at ThFree Co, Russian Federation.

agent_tokens.rb « clusters « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c49d197c3cd71e5c85f0b16092dde6099e0a1738 (plain)
1
2
3
4
5
6
7
8
9
10
11
# 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