mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
addressed PR issues
This commit is contained in:
parent
ed557f5391
commit
57283c96c3
@ -32,7 +32,7 @@ class CertificateSigningServiceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSubmitRequest() {
|
||||
fun `test submit request`() {
|
||||
val id = SecureHash.randomSHA256().toString()
|
||||
|
||||
val storage: CertificationRequestStorage = mock {
|
||||
@ -60,7 +60,7 @@ class CertificateSigningServiceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRetrieveCertificate() {
|
||||
fun `test retrieve certificate`() {
|
||||
val keyPair = X509Utilities.generateECDSAKeyPairForSSL()
|
||||
val id = SecureHash.randomSHA256().toString()
|
||||
|
||||
|
@ -14,7 +14,7 @@ class DBCertificateRequestStorageTest {
|
||||
val intermediateCA = X509Utilities.createSelfSignedCACert("Corda Node Intermediate CA")
|
||||
|
||||
@Test
|
||||
fun testSaveRequest() {
|
||||
fun `test save request`() {
|
||||
val keyPair = X509Utilities.generateECDSAKeyPairForSSL()
|
||||
val request = CertificationData("", "", X509Utilities.createCertificateSigningRequest("LegalName", "London", "admin@test.com", keyPair))
|
||||
|
||||
@ -32,7 +32,7 @@ class DBCertificateRequestStorageTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPendingRequest() {
|
||||
fun `test pending request`() {
|
||||
val keyPair = X509Utilities.generateECDSAKeyPairForSSL()
|
||||
val request = CertificationData("", "", X509Utilities.createCertificateSigningRequest("LegalName", "London", "admin@test.com", keyPair))
|
||||
|
||||
@ -49,7 +49,7 @@ class DBCertificateRequestStorageTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSaveCertificate() {
|
||||
fun `test save certificate`() {
|
||||
val keyPair = X509Utilities.generateECDSAKeyPairForSSL()
|
||||
val request = CertificationData("", "", X509Utilities.createCertificateSigningRequest("LegalName", "London", "admin@test.com", keyPair))
|
||||
|
||||
|
@ -30,6 +30,9 @@ fun <T> databaseTransaction(db: Database, statement: Transaction.() -> T): T {
|
||||
return org.jetbrains.exposed.sql.transactions.transaction(Connection.TRANSACTION_REPEATABLE_READ, 1, statement)
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method wrapping code in try finally block. A mutable list is used to keep track of functions that need to be executed in finally block.
|
||||
*/
|
||||
fun <T> withFinalizables(statement: (MutableList<() -> Unit>) -> T): T {
|
||||
val finalizables = mutableListOf<() -> Unit>()
|
||||
return try {
|
||||
|
Loading…
Reference in New Issue
Block a user