mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
style(paymentcryptography): the last three copies in the tests are one helper each (#8697)
This commit is contained in:
1 parent
bf77705ace
commit
bd2e12737f
3 files changed
+39
-32
No files matched your search
+5
-7
@@ -59,11 +59,13 @@ class PaymentCryptographyIntegrationTest {
|
||||
.when().post("/");
|
||||
}
|
||||
|
||||
private static final String CREATE_KEY = """
|
||||
private static final String CREATE_KEY_BODY = """
|
||||
{"KeyAttributes":{"KeyAlgorithm":"AES_256","KeyClass":"SYMMETRIC_KEY",
|
||||
"KeyUsage":"TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY",
|
||||
"KeyModesOfUse":{"Encrypt":true,"Decrypt":true}},
|
||||
"Exportable":true}""";
|
||||
"Exportable":true%s}""";
|
||||
|
||||
private static final String CREATE_KEY = CREATE_KEY_BODY.formatted("");
|
||||
|
||||
private static final String CREATE_WRAPPING_KEY = """
|
||||
{"KeyAttributes":{"KeyAlgorithm":"AES_256","KeyClass":"SYMMETRIC_KEY",
|
||||
@@ -380,11 +382,7 @@ class PaymentCryptographyIntegrationTest {
|
||||
* @param regions the member that names the regions, as the request spells it
|
||||
*/
|
||||
private static String createReplicatedKeyBody(String regions) {
|
||||
return """
|
||||
{"KeyAttributes":{"KeyAlgorithm":"AES_256","KeyClass":"SYMMETRIC_KEY",
|
||||
"KeyUsage":"TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY",
|
||||
"KeyModesOfUse":{"Encrypt":true,"Decrypt":true}},
|
||||
"Exportable":true,"ReplicationRegions":%s}""".formatted(regions);
|
||||
return CREATE_KEY_BODY.formatted(",\"ReplicationRegions\":" + regions);
|
||||
}
|
||||
|
||||
/** The ARN of a key the request may name. */
|
||||
|
||||
Reference in new issue
Block a user