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fy64K3QCyE9fshozIjiLyuoFb9DPAQ6FKagV0b
76
+ Q1sCSSPk+ahaqSUGMQ7Lx8v+Xj0px9qYveeX1s5TisYBFZZPoiZcyhiJxdVZxP0D
77
+ kkN+frIfndtzCCEqnYG9XZMDe4LpAmQUExMhp/SvNnuLtEofnIau0ZFyrT+ZG2vm
78
+ KAIHyk2yE+N0fn+PzxYJJz77t8htOj/g+4XQZq/U4MhnMdge2raI7fCvh+OixFb0
79
+ 7QGQpvxlAB0lO5vHf48PPYAgxgjXyiGWG0gpYAcx+t35BJRYlUWOzkjQYDzUvYfs
80
+ zGuOVnZbmlX4vtDaU27bMP0575IDtgRYa/p7J1M4BqNUicyelzbeCeSBd6NEyraU
81
+ c/deAZFD1MviBzFnbA5yXmxycbiEBmfpypfrsN8k/i4OU+bgZ2GgTLV3TcQcVulh
82
+ Z9yJGOc2CcGW9+bCPWOtxzb6ENAv4CmMyL9BmaXKYKXrKKOFnFgjVZU/SqsURoOD
83
+ FejSpTMyKeMS174YVm0qh7xw7nX1ph5mibHsS7sCfZCNywQfl91/hpalty7OeXqY
84
+ drC6WsDeShPiZlJT47AJgRfEMkZlA6DumlLikkbdCb4Mty2EhaGJ13WCGOzJ3z3k
85
+ RMVE39lIPjN2AKyK
86
+ =MlEN
87
+ -----END PGP PUBLIC KEY BLOCK-----
88
+ """
89
+
58
90
59
91
# fixture for a running redis server
60
92
@pytest .fixture
@@ -122,17 +154,17 @@ def user_credential_type(
122
154
123
155
124
156
@pytest .fixture
125
- def default_eda_credential (
157
+ def default_registry_credential (
126
158
default_organization : models .Organization ,
127
159
preseed_credential_types ,
128
160
) -> models .EdaCredential :
129
- """Return a default Credential"""
161
+ """Return a default Container Registry Credential"""
130
162
registry_credential_type = models .CredentialType .objects .get (
131
163
name = enums .DefaultCredentialType .REGISTRY
132
164
)
133
165
return models .EdaCredential .objects .create (
134
166
name = "default-eda-credential" ,
135
- description = "Default EDA Credential" ,
167
+ description = "Default Registry Credential" ,
136
168
credential_type = registry_credential_type ,
137
169
inputs = inputs_to_store (
138
170
{"username" : "dummy-user" , "password" : "dummy-password" }
@@ -171,8 +203,8 @@ def default_scm_credential(
171
203
name = enums .DefaultCredentialType .SOURCE_CONTROL
172
204
)
173
205
return models .EdaCredential .objects .create (
174
- name = "managed-eda -credential" ,
175
- description = "Default EDA Credential" ,
206
+ name = "managed-scm -credential" ,
207
+ description = "Default SCM Credential" ,
176
208
credential_type = scm_credential_type ,
177
209
inputs = inputs_to_store (
178
210
{"username" : "dummy-user" , "password" : "dummy-password" }
@@ -182,7 +214,7 @@ def default_scm_credential(
182
214
183
215
184
216
@pytest .fixture
185
- def managed_eda_credential (
217
+ def managed_registry_credential (
186
218
default_organization : models .Organization ,
187
219
preseed_credential_types ,
188
220
) -> models .EdaCredential :
@@ -192,7 +224,7 @@ def managed_eda_credential(
192
224
)
193
225
return models .EdaCredential .objects .create (
194
226
name = "managed-eda-credential" ,
195
- description = "Managed EDA Credential" ,
227
+ description = "Managed Registry Credential" ,
196
228
credential_type = scm_credential_type ,
197
229
inputs = inputs_to_store (
198
230
{"username" : "dummy-user" , "password" : "dummy-password" }
@@ -264,3 +296,21 @@ def preseed_credential_types(
264
296
) -> list [models .CredentialType ]:
265
297
"""Preseed Credential Types."""
266
298
return populate_credential_types (CREDENTIAL_TYPES )
299
+
300
+
301
+ @pytest .fixture
302
+ def default_gpg_credential (
303
+ default_organization : models .Organization ,
304
+ preseed_credential_types ,
305
+ ) -> models .EdaCredential :
306
+ """Return a default GPG Credential"""
307
+ gpg_credential_type = models .CredentialType .objects .get (
308
+ name = enums .DefaultCredentialType .GPG
309
+ )
310
+ return models .EdaCredential .objects .create (
311
+ name = "default-gpg-credential" ,
312
+ description = "Default GPG Credential" ,
313
+ credential_type = gpg_credential_type ,
314
+ inputs = inputs_to_store ({"gpg_public_key" : DUMMY_GPG_KEY }),
315
+ organization = default_organization ,
316
+ )
0 commit comments