2017-05-31 09:43:19 -04:00
|
|
|
require_relative '../support/helpers/key_generator_helper'
|
|
|
|
|
2017-12-13 19:13:44 -05:00
|
|
|
FactoryBot.define do
|
2016-02-16 22:55:24 -05:00
|
|
|
factory :key do
|
|
|
|
title
|
2017-05-31 09:43:19 -04:00
|
|
|
key { Spec::Support::Helpers::KeyGeneratorHelper.new(1024).generate + ' dummy@gitlab.com' }
|
2016-02-16 22:55:24 -05:00
|
|
|
|
2018-02-01 17:00:16 -05:00
|
|
|
factory :key_without_comment do
|
|
|
|
key { Spec::Support::Helpers::KeyGeneratorHelper.new(1024).generate }
|
|
|
|
end
|
|
|
|
|
2017-05-31 09:43:19 -04:00
|
|
|
factory :deploy_key, class: 'DeployKey'
|
2016-02-16 22:55:24 -05:00
|
|
|
|
|
|
|
factory :personal_key do
|
|
|
|
user
|
|
|
|
end
|
|
|
|
|
|
|
|
factory :another_key do
|
2017-05-31 09:43:19 -04:00
|
|
|
factory :another_deploy_key, class: 'DeployKey'
|
2016-02-16 22:55:24 -05:00
|
|
|
end
|
2017-04-05 02:22:28 -04:00
|
|
|
|
2017-08-21 06:30:03 -04:00
|
|
|
factory :rsa_key_2048 do
|
|
|
|
key do
|
2018-01-02 09:40:07 -05:00
|
|
|
<<~KEY.delete("\n")
|
|
|
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFf6RYK3qu/RKF/3ndJmL5xgMLp3O9
|
|
|
|
6x8lTay+QGZ0+9FnnAXMdUqBq/ZU6d/gyMB4IaW3nHzM1w049++yAB6UPCzMB8Uo27K5
|
|
|
|
/jyZCtj7Vm9PFNjF/8am1kp46c/SeYicQgQaSBdzIW3UDEa1Ef68qroOlvpi9PYZ/tA7
|
|
|
|
M0YP0K5PXX+E36zaIRnJVMPT3f2k+GnrxtjafZrwFdpOP/Fol5BQLBgcsyiU+LM1SuaC
|
|
|
|
rzd8c9vyaTA1CxrkxaZh+buAi0PmdDtaDrHd42gqZkXCKavyvgM5o2CkQ5LJHCgz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7BfmfByT+AZTqZySrCyc7nNZL3YgGLK0l6A
|
|
|
|
1GgAAAEBAN9FpFOdIXE+YEZhKl1vPmbcn+b1y5zOl6N4x1B7Q8pD/pLMziWROIS8uLzb
|
|
|
|
aZ0sMIWezHIkxuo1iROMeT+jtCubn7ragaN6AX7nMpxYUH9+mYZZs/fyElt6wCviVhTI
|
|
|
|
zM+u7VdQsnZttOOlQfogHdL+SpeAft0DsfJjlcgQnsLlHQKv6aPqCPYUST2nE7RyW/Ex
|
|
|
|
PrMxLtOWt0/j8RYHbwwqvyeZqBz3ESBgrS9c5tBdBfauwYUV/E7gPLOU3OZFw9ue7o+z
|
|
|
|
wzoTZqW6Xouy5wtWvSLQSLT5XwOslmQz8QMBxD0AQyDfEFGsBCWzmbTgKv9uqrBjubsS
|
|
|
|
Taja+Cf9kMo== dummy@gitlab.com
|
|
|
|
KEY
|
2017-08-21 06:30:03 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
factory :ecdsa_key_256 do
|
|
|
|
key do
|
2018-01-02 09:40:07 -05:00
|
|
|
<<~KEY.delete("\n")
|
|
|
|
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYA
|
|
|
|
AABBBJZmkzTgY0fiCQ+DVReyH/fFwTFz0XoR3RUO0u+199H19KFw7mNPxRSMOVS7tEtO
|
|
|
|
Nj3Q7FcZXfqthHvgAzDiHsc= dummy@gitlab.com
|
|
|
|
KEY
|
2017-08-21 06:30:03 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
factory :ed25519_key_256 do
|
|
|
|
key do
|
2018-01-02 09:40:07 -05:00
|
|
|
<<~KEY.delete("\n")
|
|
|
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETnVTgzqC1gatgSlC4zH6aYt2CAQzgJ
|
|
|
|
OhDRvf59ohL6 dummy@gitlab.com
|
|
|
|
KEY
|
2017-08-21 06:30:03 -04:00
|
|
|
end
|
|
|
|
end
|
2016-02-16 22:55:24 -05:00
|
|
|
end
|
|
|
|
end
|