Browse Source

Improve test method names for clarity

- separateCertAndKey — separate cert and key PEM inputs
- combinedPemWithCertAndKey — combined PEM, both present
- combinedPemWithCertOnly — combined PEM, key missing → error
- encryptedPrivateKey — encrypted key with password

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pull/15205/head
Sergey Matvienko 5 months ago
parent
commit
c65b172d7e
  1. 12
      application/src/test/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSslTest.java

12
application/src/test/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSslTest.java

@ -121,9 +121,9 @@ class EdgeGrpcSslTest {
}
}
@ParameterizedTest(name = "separateCertAndKeyFiles_{0}")
@ParameterizedTest(name = "separateCertAndKey_{0}")
@EnumSource(KeyType.class)
void separateCertAndKeyFiles(KeyType keyType) throws Exception {
void separateCertAndKey(KeyType keyType) throws Exception {
KeyPair kp = keyType.generateKeyPair();
X509Certificate cert = generateSelfSignedCert(kp, keyType.sigAlg);
@ -134,9 +134,9 @@ class EdgeGrpcSslTest {
assertTlsConnectivity(cert);
}
@ParameterizedTest(name = "combinedPemFile_{0}")
@ParameterizedTest(name = "combinedPemWithCertAndKey_{0}")
@EnumSource(KeyType.class)
void combinedPemFile(KeyType keyType) throws Exception {
void combinedPemWithCertAndKey(KeyType keyType) throws Exception {
KeyPair kp = keyType.generateKeyPair();
X509Certificate cert = generateSelfSignedCert(kp, keyType.sigAlg);
@ -162,9 +162,9 @@ class EdgeGrpcSslTest {
assertTlsConnectivity(cert);
}
@ParameterizedTest(name = "combinedPemWithoutKey_{0}")
@ParameterizedTest(name = "combinedPemWithCertOnly_throwsException_{0}")
@EnumSource(KeyType.class)
void combinedPemWithoutKey_throwsException(KeyType keyType) throws Exception {
void combinedPemWithCertOnly_throwsException(KeyType keyType) throws Exception {
KeyPair kp = keyType.generateKeyPair();
X509Certificate cert = generateSelfSignedCert(kp, keyType.sigAlg);

Loading…
Cancel
Save