mirror of
https://github.com/corda/corda.git
synced 2025-02-21 09:51:57 +00:00
[EG-503] Test cases for exposed notaryService (#6161)
This commit is contained in:
parent
e5d554571f
commit
45b43f116d
@ -72,6 +72,15 @@ class NodeTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test(timeout=300_000)
|
||||
fun `check node service availability`() {
|
||||
val configuration = createConfig(ALICE_NAME)
|
||||
val info = VersionInfo(789, "3.0", "SNAPSHOT", "R3")
|
||||
val node = Node(configuration, info, initialiseSerialization = false)
|
||||
// Regular nodes must not have internal access to the notary service
|
||||
assertNull(node.services.notaryService)
|
||||
}
|
||||
|
||||
@Test(timeout=300_000)
|
||||
fun `clear network map cache works`() {
|
||||
val configuration = createConfig(ALICE_NAME)
|
||||
|
@ -24,6 +24,7 @@ import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import kotlin.test.assertFailsWith
|
||||
import kotlin.test.assertNotNull
|
||||
|
||||
class NotaryServiceTests {
|
||||
private lateinit var mockNet: InternalMockNetwork
|
||||
@ -55,6 +56,11 @@ class NotaryServiceTests {
|
||||
notariseWithTooManyInputs(aliceNode, alice, notary, mockNet)
|
||||
}
|
||||
|
||||
@Test(timeout=300_000)
|
||||
fun `notary node should have access to its notary service`() {
|
||||
assertNotNull(mockNet.defaultNotaryNode.notaryService)
|
||||
}
|
||||
|
||||
@Test(timeout=300_000)
|
||||
fun `should reject when network parameters component is not visible`() {
|
||||
val stx = generateTransaction(aliceNode, alice, notary, null, 13)
|
||||
|
Loading…
x
Reference in New Issue
Block a user