From 22e4b8e96284f35d2eda4a4e14d36298c7c0f33c Mon Sep 17 00:00:00 2001 From: gwr3com <51672878+gwr3com@users.noreply.github.com> Date: Wed, 10 Jul 2019 11:31:44 +0100 Subject: [PATCH] =?UTF-8?q?CORDA-3028:=20Add=20Node=20Diagnostics=20Info?= =?UTF-8?q?=20RPC=20Call=20-=20Backport=20a=20diff=20from=E2=80=A6=20(#528?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * CORDA-3028: Add Node Diagnostics Info RPC Call - Backport a diff from Corda ENT * CORDA-3028: Add Node Diagnostics Info RPC Call - Rename a value for consistency * CORDA-3028: Add Node Diagnostics Info RPC Call - One more change --- .../integration-test/kotlin/net/corda/node/NodeRPCTests.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node/src/integration-test/kotlin/net/corda/node/NodeRPCTests.kt b/node/src/integration-test/kotlin/net/corda/node/NodeRPCTests.kt index 0470cdd2cb..d28ca8d023 100644 --- a/node/src/integration-test/kotlin/net/corda/node/NodeRPCTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/NodeRPCTests.kt @@ -11,7 +11,7 @@ import kotlin.test.assertTrue class NodeRPCTests { private val CORDA_VERSION_REGEX = "\\d+(\\.\\d+)?(-\\w+)?".toRegex() // e.g. "5.0-SNAPSHOT" - private val CORDA_VENDOR = "Corda Open Source" + private val CORDA_VENDOR_REGEX = "Corda (Open Source|Enterprise Edition)".toRegex() private val CORDAPPS = listOf(FINANCE_CONTRACTS_CORDAPP, FINANCE_WORKFLOWS_CORDAPP) private val CORDAPP_TYPES = setOf("Contract CorDapp", "Workflow CorDapp") private val CORDAPP_CONTRACTS_NAME_REGEX = "corda-finance-contracts-$CORDA_VERSION_REGEX".toRegex() @@ -23,12 +23,12 @@ class NodeRPCTests { @Test fun `run nodeDiagnosticInfo`() { - driver(DriverParameters(notarySpecs = emptyList(), cordappsForAllNodes = CORDAPPS)) { + driver(DriverParameters(notarySpecs = emptyList(), cordappsForAllNodes = CORDAPPS, extraCordappPackagesToScan = emptyList())) { val nodeDiagnosticInfo = startNode().get().rpc.nodeDiagnosticInfo() assertTrue(nodeDiagnosticInfo.version.matches(CORDA_VERSION_REGEX)) assertTrue(nodeDiagnosticInfo.revision.matches(HEXADECIMAL_REGEX)) assertEquals(PLATFORM_VERSION, nodeDiagnosticInfo.platformVersion) - assertEquals(CORDA_VENDOR, nodeDiagnosticInfo.vendor) + assertTrue(nodeDiagnosticInfo.vendor.matches(CORDA_VENDOR_REGEX)) assertEquals(CORDAPPS.size, nodeDiagnosticInfo.cordapps.size) assertEquals(CORDAPP_TYPES, nodeDiagnosticInfo.cordapps.map { it.type }.toSet()) assertTrue(nodeDiagnosticInfo.cordapps.any { it.name.matches(CORDAPP_CONTRACTS_NAME_REGEX) })