CORDA-4189: Now compare against Corda Community Edition as well. (#7046)

* CORDA-4189: Now compare against Corda Community Edition as well.

* CORDA-4189: Removed unused imports.
This commit is contained in:
Adel El-Beik 2022-01-26 11:33:23 +00:00 committed by GitHub
parent a02f2e9f6a
commit fb624a2b06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ import kotlin.test.assertTrue
class NodeRPCTests { class NodeRPCTests {
private val CORDA_VERSION_REGEX = "\\d+(\\.\\d+)?(\\.\\d+)?(-\\w+)?".toRegex() private val CORDA_VERSION_REGEX = "\\d+(\\.\\d+)?(\\.\\d+)?(-\\w+)?".toRegex()
private val CORDA_VENDOR = "Corda Open Source" private val CORDA_VENDOR = "Corda Open Source"
private val CORDA_VENDOR_CE = "Corda Community Edition"
private val CORDAPPS = listOf(FINANCE_CONTRACTS_CORDAPP, FINANCE_WORKFLOWS_CORDAPP) private val CORDAPPS = listOf(FINANCE_CONTRACTS_CORDAPP, FINANCE_WORKFLOWS_CORDAPP)
private val CORDAPP_TYPES = setOf("Contract CorDapp", "Workflow CorDapp") private val CORDAPP_TYPES = setOf("Contract CorDapp", "Workflow CorDapp")
private val CLASSIFIER = if (SystemUtils.IS_JAVA_11) "-jdk11" else "" private val CLASSIFIER = if (SystemUtils.IS_JAVA_11) "-jdk11" else ""
@ -30,6 +31,7 @@ class NodeRPCTests {
assertTrue(nodeDiagnosticInfo.version.matches(CORDA_VERSION_REGEX)) assertTrue(nodeDiagnosticInfo.version.matches(CORDA_VERSION_REGEX))
assertEquals(PLATFORM_VERSION, nodeDiagnosticInfo.platformVersion) assertEquals(PLATFORM_VERSION, nodeDiagnosticInfo.platformVersion)
assertEquals(CORDA_VENDOR, nodeDiagnosticInfo.vendor) assertEquals(CORDA_VENDOR, nodeDiagnosticInfo.vendor)
assertTrue(nodeDiagnosticInfo.vendor == CORDA_VENDOR || nodeDiagnosticInfo.vendor == CORDA_VENDOR_CE)
nodeDiagnosticInfo.cordapps.forEach { println("${it.shortName} ${it.type}") } nodeDiagnosticInfo.cordapps.forEach { println("${it.shortName} ${it.type}") }
assertEquals(CORDAPPS.size, nodeDiagnosticInfo.cordapps.size) assertEquals(CORDAPPS.size, nodeDiagnosticInfo.cordapps.size)
assertEquals(CORDAPP_TYPES, nodeDiagnosticInfo.cordapps.map { it.type }.toSet()) assertEquals(CORDAPP_TYPES, nodeDiagnosticInfo.cordapps.map { it.type }.toSet())