mirror of
https://github.com/corda/corda.git
synced 2024-12-22 06:17:55 +00:00
It's not commonName it's organisation. (#1987)
This commit is contained in:
parent
d882f8871e
commit
7521675ef2
@ -26,7 +26,7 @@ class NodeControllerTest {
|
|||||||
@Test
|
@Test
|
||||||
fun `register notary`() {
|
fun `register notary`() {
|
||||||
assertFalse(controller.hasNotary())
|
assertFalse(controller.hasNotary())
|
||||||
val config = createConfig(commonName = "Name", notary = NotaryService(false))
|
val config = createConfig(organisation = "Name", notary = NotaryService(false))
|
||||||
controller.register(config)
|
controller.register(config)
|
||||||
assertTrue(controller.hasNotary())
|
assertTrue(controller.hasNotary())
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ class NodeControllerTest {
|
|||||||
@Test
|
@Test
|
||||||
fun `register non notary`() {
|
fun `register non notary`() {
|
||||||
assertFalse(controller.hasNotary())
|
assertFalse(controller.hasNotary())
|
||||||
val config = createConfig(commonName = "Name")
|
val config = createConfig(organisation = "Name")
|
||||||
controller.register(config)
|
controller.register(config)
|
||||||
assertFalse(controller.hasNotary())
|
assertFalse(controller.hasNotary())
|
||||||
}
|
}
|
||||||
@ -65,15 +65,14 @@ class NodeControllerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test register unique nodes`() {
|
fun `test register unique nodes`() {
|
||||||
val config = createConfig(commonName = organisation2Name)
|
val config = createConfig(organisation = organisation2Name)
|
||||||
assertTrue(controller.register(config))
|
assertTrue(controller.register(config))
|
||||||
assertFalse(controller.register(config))
|
assertFalse(controller.register(config))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test unique key after register`() {
|
fun `test unique key after register`() {
|
||||||
val config = createConfig(commonName = organisation2Name)
|
val config = createConfig(organisation = organisation2Name)
|
||||||
|
|
||||||
assertFalse(controller.keyExists("organisation2"))
|
assertFalse(controller.keyExists("organisation2"))
|
||||||
controller.register(config)
|
controller.register(config)
|
||||||
assertTrue(controller.keyExists("organisation2"))
|
assertTrue(controller.keyExists("organisation2"))
|
||||||
@ -81,8 +80,7 @@ class NodeControllerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test matching name after register`() {
|
fun `test matching name after register`() {
|
||||||
val config = createConfig(commonName = organisation2Name)
|
val config = createConfig(organisation = organisation2Name)
|
||||||
|
|
||||||
assertFalse(controller.nameExists("Organisation 2"))
|
assertFalse(controller.nameExists("Organisation 2"))
|
||||||
assertFalse(controller.nameExists("Organisation2"))
|
assertFalse(controller.nameExists("Organisation2"))
|
||||||
assertFalse(controller.nameExists("organisation 2"))
|
assertFalse(controller.nameExists("organisation 2"))
|
||||||
@ -138,7 +136,7 @@ class NodeControllerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `dispose node`() {
|
fun `dispose node`() {
|
||||||
val config = createConfig(commonName = "MyName")
|
val config = createConfig(organisation = "MyName")
|
||||||
controller.register(config)
|
controller.register(config)
|
||||||
|
|
||||||
assertEquals(NodeState.STARTING, config.state)
|
assertEquals(NodeState.STARTING, config.state)
|
||||||
@ -149,7 +147,7 @@ class NodeControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun createConfig(
|
private fun createConfig(
|
||||||
commonName: String = "Unknown",
|
organisation: String = "Unknown",
|
||||||
p2pPort: Int = 0,
|
p2pPort: Int = 0,
|
||||||
rpcPort: Int = 0,
|
rpcPort: Int = 0,
|
||||||
webPort: Int = 0,
|
webPort: Int = 0,
|
||||||
@ -159,7 +157,7 @@ class NodeControllerTest {
|
|||||||
): NodeConfigWrapper {
|
): NodeConfigWrapper {
|
||||||
val nodeConfig = NodeConfig(
|
val nodeConfig = NodeConfig(
|
||||||
myLegalName = CordaX500Name(
|
myLegalName = CordaX500Name(
|
||||||
organisation = commonName,
|
organisation = organisation,
|
||||||
locality = "New York",
|
locality = "New York",
|
||||||
country = "US"
|
country = "US"
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user