From aca00700aaf1c9e398194a5cb0f7df2769740a28 Mon Sep 17 00:00:00 2001 From: Qian Hong Date: Tue, 28 Mar 2017 22:57:36 +1100 Subject: [PATCH] docs: Create users separately for different parties with minimum required permission. (#440) --- .../corda/docs/IntegrationTestingTutorial.kt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/source/example-code/src/integration-test/kotlin/net/corda/docs/IntegrationTestingTutorial.kt b/docs/source/example-code/src/integration-test/kotlin/net/corda/docs/IntegrationTestingTutorial.kt index 489e1eb6b5..79da23a959 100644 --- a/docs/source/example-code/src/integration-test/kotlin/net/corda/docs/IntegrationTestingTutorial.kt +++ b/docs/source/example-code/src/integration-test/kotlin/net/corda/docs/IntegrationTestingTutorial.kt @@ -29,25 +29,26 @@ class IntegrationTestingTutorial { fun `alice bob cash exchange example`() { // START 1 driver { - val testUser = User("testUser", "testPassword", permissions = setOf( - startFlowPermission(), + val aliceUser = User("aliceUser", "testPassword1", permissions = setOf( + startFlowPermission() + )) + val bobUser = User("bobUser", "testPassword2", permissions = setOf( startFlowPermission() )) val (alice, bob, notary) = Futures.allAsList( - startNode("Alice", rpcUsers = listOf(testUser)), - startNode("Bob", rpcUsers = listOf(testUser)), + startNode("Alice", rpcUsers = listOf(aliceUser)), + startNode("Bob", rpcUsers = listOf(bobUser)), startNode("Notary", advertisedServices = setOf(ServiceInfo(ValidatingNotaryService.type))) ).getOrThrow() // END 1 // START 2 val aliceClient = alice.rpcClientToNode() - - aliceClient.start("testUser", "testPassword") + aliceClient.start("aliceUser", "testPassword1") val aliceProxy = aliceClient.proxy() - val bobClient = bob.rpcClientToNode() - bobClient.start("testUser", "testPassword") + val bobClient = bob.rpcClientToNode() + bobClient.start("bobUser", "testPassword2") val bobProxy = bobClient.proxy() // END 2