summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-07 00:09:12 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-07 00:09:12 +0000
commit6168721025dd8e98caeb2bf6844273e6690eaf69 (patch)
tree8c4fb20d793669e488a739bc9951dab8b363eed4 /spec/factories
parenta89cb5cbdd832d4d9e80517973aceda6bc0a3856 (diff)
downloadgitlab-ce-6168721025dd8e98caeb2bf6844273e6690eaf69.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/x509_certificate.rb12
-rw-r--r--spec/factories/x509_commit_signature.rb10
-rw-r--r--spec/factories/x509_issuer.rb10
3 files changed, 32 insertions, 0 deletions
diff --git a/spec/factories/x509_certificate.rb b/spec/factories/x509_certificate.rb
new file mode 100644
index 00000000000..819ad0704dc
--- /dev/null
+++ b/spec/factories/x509_certificate.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :x509_certificate do
+ subject_key_identifier { 'BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC:BC' }
+ subject { 'CN=gitlab@example.org,OU=Example,O=World' }
+
+ email { 'gitlab@example.org' }
+ serial_number { 278969561018901340486471282831158785578 }
+ x509_issuer
+ end
+end
diff --git a/spec/factories/x509_commit_signature.rb b/spec/factories/x509_commit_signature.rb
new file mode 100644
index 00000000000..a342b240690
--- /dev/null
+++ b/spec/factories/x509_commit_signature.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :x509_commit_signature do
+ commit_sha { Digest::SHA1.hexdigest(SecureRandom.hex) }
+ project
+ x509_certificate
+ verification_status { :verified }
+ end
+end
diff --git a/spec/factories/x509_issuer.rb b/spec/factories/x509_issuer.rb
new file mode 100644
index 00000000000..e003b16ad86
--- /dev/null
+++ b/spec/factories/x509_issuer.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :x509_issuer do
+ subject_key_identifier { 'AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB' }
+ subject { 'CN=PKI,OU=Example,O=World' }
+
+ crl_url { 'http://example.com/pki.crl' }
+ end
+end