Merge remote-tracking branch 'open-source/master' into thomas/os-merge-2018-07-11
Conflicts: finance/src/integration-test/kotlin/net/corda/finance/flows/CashConfigDataFlowTest.kt node/src/integration-test/kotlin/net/corda/node/BootTests.kt node/src/integration-test/kotlin/net/corda/node/NodeUnloadHandlerTests.kt node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt tools/shell/src/integration-test/kotlin/net/corda/tools/shell/InteractiveShellIntegrationTest.kt tools/shell/src/integration-test/kotlin/net/corda/tools/shell/SSHServerTest.kt webserver/src/integration-test/kotlin/net/corda/webserver/WebserverDriverTests.kt
@ -48,7 +48,7 @@ class BlacklistKotlinClosureTest : IntegrationTest() {
|
||||
|
||||
@Test
|
||||
fun `closure sent via RPC`() {
|
||||
driver(DriverParameters(startNodesInProcess = true)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, notarySpecs = emptyList())) {
|
||||
val rpc = startNode(providedName = ALICE_NAME).getOrThrow().rpc
|
||||
val packet = Packet { EVIL }
|
||||
assertThatExceptionOfType(RPCException::class.java)
|
||||
|
@ -54,7 +54,7 @@ class FlowsExecutionModeRpcTest : IntegrationTest() {
|
||||
assumeFalse(System.getProperty("os.name").toLowerCase().startsWith("win"))
|
||||
|
||||
val user = User("mark", "dadada", setOf(invokeRpc("setFlowsDrainingModeEnabled"), invokeRpc("isFlowsDrainingModeEnabled")))
|
||||
driver(DriverParameters(inMemoryDB = false, startNodesInProcess = true)) {
|
||||
driver(DriverParameters(inMemoryDB = false, startNodesInProcess = true, notarySpecs = emptyList())) {
|
||||
val nodeName = {
|
||||
val nodeHandle = startNode(rpcUsers = listOf(user)).getOrThrow()
|
||||
val nodeName = nodeHandle.nodeInfo.chooseIdentity().name
|
||||
|
@ -11,7 +11,7 @@
|
||||
gradlePluginsVersion=4.0.25
|
||||
kotlinVersion=1.2.51
|
||||
platformVersion=4
|
||||
guavaVersion=21.0
|
||||
guavaVersion=25.1-jre
|
||||
proguardVersion=6.0.3
|
||||
bouncycastleVersion=1.57
|
||||
typesafeConfigVersion=1.3.1
|
||||
|
111
docs/source/aws-vm-explore.rst
Normal file
@ -0,0 +1,111 @@
|
||||
Deploying Corda to Corda Testnet from an AWS Cloud Platform VM
|
||||
==============================================================
|
||||
|
||||
.. contents::
|
||||
|
||||
This document explains how to deploy a Corda node to AWS that can connect directly to the Corda Testnet.
|
||||
A self service download link can be obtained from https://testnet.corda.network. This
|
||||
document will describe how to set up a virtual machine on the AWS
|
||||
Cloud Platform to deploy your pre-configured Corda node and automatically connnect
|
||||
to Testnet.
|
||||
|
||||
Pre-requisites
|
||||
--------------
|
||||
* Ensure you have a registered Amazon AWS account which can create virtual machines and you are logged on to the AWS console: https://console.aws.amazon.com.
|
||||
|
||||
|
||||
Deploy Corda node
|
||||
-----------------
|
||||
|
||||
Browse to https://console.aws.amazon.com and log in with your AWS account.
|
||||
|
||||
|
||||
**STEP 1: Launch a new virtual machine**
|
||||
|
||||
Click on Launch a virtual machine with EC2.
|
||||
|
||||
.. image:: resources/aws-launch.png
|
||||
|
||||
In the quick start wizard scroll down and select the most recent Ubuntu machine image as the Amazon Machine Image (AMI).
|
||||
|
||||
.. image:: resources/aws_select_ubuntu.png
|
||||
|
||||
Select the instance type (for example t2.xlarge).
|
||||
|
||||
.. image:: resources/aws-instance-type.png
|
||||
|
||||
Configure a couple of other settings before we review and launch
|
||||
|
||||
Under the storage tab (Step 4) increase the storage to 40GB:
|
||||
|
||||
.. image:: resources/aws-storage.png
|
||||
|
||||
Configure the security group (Step 6) to open the firewall ports which Corda uses.
|
||||
|
||||
.. image:: resources/aws-firewall.png
|
||||
|
||||
Add a firewall rule for port range 10002-10003 and allow connection from Anywhere. Add another rule for the webserver on port 8080.
|
||||
|
||||
Click on the Review and Launch button then if everything looks ok click Launch.
|
||||
|
||||
You will be prompted to set up keys to securely access the VM remotely over ssh. Select "Create a new key pair" from the drop down and enter a name for the key file. Click download to get the keys and keep them safe on your local machine.
|
||||
|
||||
.. note:: These keys are just for connecting to your VM and are separate from the keys Corda will use to sign transactions. These keys will be generated as part of the download bundle.
|
||||
|
||||
.. image:: resources/aws-keys.png
|
||||
|
||||
Click "Launch Instances".
|
||||
|
||||
Click on the link to go to the Instances pages in the AWS console where after a few minutes you will be able to see your instance running.
|
||||
|
||||
.. image:: resources/aws-instances.png
|
||||
|
||||
**STEP 2: Set up static IP address**
|
||||
|
||||
On AWS a permanent IP address is called an Elastic IP. Click on the
|
||||
"Elastic IP" link in the navigation panel on the left hand side of the console and then click on "Allocate new address":
|
||||
|
||||
.. image:: resources/aws-elastic.png
|
||||
|
||||
Follow the form then once the address is allocated click on "Actions"
|
||||
then "Associate address":
|
||||
|
||||
.. image:: resources/aws-elastic-actions.png
|
||||
|
||||
Then select the instance you created for your Corda node to attach the
|
||||
IP address to.
|
||||
|
||||
**STEP 3: Connect to your VM and set up the environment**
|
||||
|
||||
In the instances console click on "Connect" and follow the instructions to connect to your instance using ssh.
|
||||
|
||||
.. image:: resources/aws-instances-connect.png
|
||||
|
||||
.. image:: resources/aws-connect.png
|
||||
|
||||
|
||||
**STEP 4: Download and set up your Corda node**
|
||||
|
||||
Now your AWS environment is configured you can switch back to the Testnet
|
||||
web application and click on the copy to clipboard button to get a one
|
||||
time installation script.
|
||||
|
||||
.. note:: If you have not already set up your account on Testnet then please visit https://testnet.corda.network and sign up.
|
||||
|
||||
.. image:: resources/testnet-platform.png
|
||||
|
||||
You can generate as many Testnet identites as you like by refreshing
|
||||
this page to generate a new one time link.
|
||||
|
||||
In the terminal of your cloud instance paste the command you just copied to install and run
|
||||
your unique Corda instance on that instance:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
sudo ONE_TIME_DOWNLOAD_KEY=YOUR_UNIQUE_DOWNLOAD_KEY_HERE bash -c "$(curl -L https://testnet.corda.network/api/user/node/install.sh)"
|
||||
|
||||
.. warning:: This command will execute the install script as ROOT on your cloud instance. You may wish to examine the script prior to executing it on your machine.
|
||||
|
||||
You can now navigate to the external web address of the instance and
|
||||
see any cordapps running on port 8080 (if you have any installed).
|
||||
|
135
docs/source/azure-vm-explore.rst
Normal file
@ -0,0 +1,135 @@
|
||||
Deploying Corda to Corda Testnet from an Azure Cloud Platform VM
|
||||
================================================================
|
||||
|
||||
.. contents::
|
||||
|
||||
This document explains how to deploy a Corda node to Azure that can connect directly to the Corda Testnet. A self service download link can be obtained from https://testnet.corda.network. This document will describe how to set up a virtual machine on the Azure Cloud Platform to deploy your pre-configured Corda node and automatically connnect to Testnet.
|
||||
|
||||
Pre-requisites
|
||||
--------------
|
||||
* Ensure you have a registered Microsoft Azure account which can create virtual machines and you are logged on to the Azure portal: https://portal.azure.com.
|
||||
|
||||
|
||||
Deploy Corda node
|
||||
-----------------
|
||||
|
||||
Browse to https://portal.azure.com and log in with your Microsoft account.
|
||||
|
||||
|
||||
**STEP 1: Create a Resource Group**
|
||||
|
||||
Click on the "Resource groups" link in the side nav in the Azure
|
||||
Portal and then click "Add":
|
||||
|
||||
.. image:: resources/azure-rg.png
|
||||
|
||||
Fill in the form and click "Create":
|
||||
|
||||
.. image:: resources/azure-rg-2.png
|
||||
|
||||
**STEP 2: Launch the VM**
|
||||
|
||||
At the top of the left sidenav click on the button with the green cross "Create a resource".
|
||||
|
||||
In this example we are going to use an Ubuntu server so select the latest Ubuntu Server option.
|
||||
|
||||
.. image:: resources/azure-select-ubuntu.png
|
||||
|
||||
Fill in the form:
|
||||
|
||||
.. image:: resources/azure-vm-form.png
|
||||
|
||||
Add a username (to log into the VM) and choose and enter a password.
|
||||
|
||||
Choose the resource group we created earlier from the "Use existing" dropdown.
|
||||
|
||||
Select a cloud region geographically near to your location to host your VM.
|
||||
|
||||
Click on OK.
|
||||
|
||||
Choose the "D4S_V3 Standard" option and click "Select":
|
||||
|
||||
.. image:: resources/azure-instance-type.png
|
||||
|
||||
Click on "Public IP address" to open the settings panel
|
||||
|
||||
.. image:: resources/azure-vm-settings.png
|
||||
|
||||
Set the IP address to "Static" under Assignment.
|
||||
|
||||
.. note:: This is so the IP address for your node does not change rapidly in the global network map.
|
||||
|
||||
.. image:: resources/azure-set-static-ip.png
|
||||
|
||||
Click OK.
|
||||
|
||||
Next click on "Network security group (firewall)":
|
||||
|
||||
.. image:: resources/azure-nsg.png
|
||||
|
||||
Add inbound rules for ports 8080 (webserver), and
|
||||
10002-10003 for the P2P and RPC ports used by the Corda node
|
||||
respectively:
|
||||
|
||||
Add 3 rules with the following port, name and priorities:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
Port range: 10002, Priority: 1041 Name: Port_10002
|
||||
Port range: 10003, Priority: 1042 Name: Port_10003
|
||||
Port range: 8080, Priority: 1043 Name: Port_8080
|
||||
|
||||
.. note:: The priority has to be unique number in the range 900
|
||||
(highest) and 4096 (lowest) priority. Make sure each rule
|
||||
has a unique priority or there will be a validation failure and error message.
|
||||
|
||||
.. image:: resources/azure-nsg-2.png
|
||||
|
||||
Click OK and OK again on the Settings panel.
|
||||
|
||||
.. image:: resources/azure-settings-ok.png
|
||||
|
||||
|
||||
Click "Create" and wait a few minutes for your instance to provision
|
||||
and start running.
|
||||
|
||||
.. image:: resources/azure-create-vm.png
|
||||
|
||||
|
||||
|
||||
**STEP 3: Connect to your VM and set up the environment**
|
||||
|
||||
Once your instance is running click on the "Connect" button and copy the ssh command:
|
||||
|
||||
.. image:: resources/azure-ssh.png
|
||||
|
||||
Enter the ssh command into your terminal. At the prompt to continue connecting type yes and then enter the password you configured earlier to log into the remote VM:
|
||||
|
||||
.. image:: resources/azure-shell.png
|
||||
|
||||
|
||||
**STEP 4: Download and set up your Corda node**
|
||||
|
||||
Now your Azure environment is configured you can switch to the Testnet
|
||||
web application and click on the copy to clipboard button to get a one
|
||||
time installation script.
|
||||
|
||||
.. note:: If you have not already set up your account on Testnet then please visit https://testnet.corda.network and sign up.
|
||||
|
||||
|
||||
.. image:: resources/testnet-platform.png
|
||||
|
||||
You can generate as many Testnet identites as you like by refreshing
|
||||
this page to generate a new one time link.
|
||||
|
||||
In the terminal of your cloud instance paste the command you just copied to install and run
|
||||
your unique Corda node:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
sudo ONE_TIME_DOWNLOAD_KEY=YOUR_UNIQUE_DOWNLOAD_KEY_HERE bash -c "$(curl -L https://testnet.corda.network/api/user/node/install.sh)"
|
||||
|
||||
.. warning:: This command will execute the install script as ROOT on your cloud instance. You may wish to examine the script prior to executing it on your machine.
|
||||
|
||||
You can now navigate to the external web address of the instance and
|
||||
see any cordapps running on port 8080 (if you have any installed).
|
@ -9,4 +9,8 @@ Networks
|
||||
permissioning
|
||||
network-map
|
||||
versioning
|
||||
corda-testnet-intro
|
||||
azure-vm-explore
|
||||
aws-vm-explore
|
||||
gcp-vm
|
||||
cipher-suites
|
||||
|
75
docs/source/corda-testnet-intro.rst
Normal file
@ -0,0 +1,75 @@
|
||||
The Corda Testnet
|
||||
=================
|
||||
|
||||
.. contents::
|
||||
|
||||
The Corda Testnet is an open public network of Corda nodes on the internet. It is designed to be a complement to *the* Corda Network where any entity can transact real world value with any other counterparty in the context of any application. The Corda Testnet is designed for "non-production" use in a genuine global context of Corda nodes, including but not limited to CorDapp development, multi-party testing, demonstration and showcasing of applications and services, learning, training and development of the Corda platform technology and specific applications of Corda.
|
||||
|
||||
The Corda Testnet is based on exactly the same technology as the main Corda Network, but can be joined on a self-service basis through the automated provisioning system described below.
|
||||
|
||||
The Corda Testnet is currently in private beta. Interested parties can request in invitation to join the Corda Testnet by completing a short request form (see below).
|
||||
|
||||
|
||||
Deploying a Corda node to the Corda Testnet
|
||||
-------------------------------------------
|
||||
|
||||
Access to the Corda Testnet is enabled by visiting https://testnet.corda.network.
|
||||
|
||||
.. image:: resources/testnet-landing.png
|
||||
:target: https://testnet.corda.network
|
||||
|
||||
Click on "Join the Corda Testnet".
|
||||
|
||||
Select whether you want to register a company or as an individual on the Testnet.
|
||||
|
||||
This will create you an account with the Testnet onboarding application which will enable you to provision and manage multiple Corda nodes on Testnet. You will log in to this account to view and manage you Corda Testnet identitiy certificates.
|
||||
|
||||
.. image:: resources/testnet-account-type.png
|
||||
|
||||
Fill in the form with your details. This helps prioritise requests to join the private beta.
|
||||
|
||||
|
||||
.. image:: resources/testnet-form.png
|
||||
|
||||
Note we currently only support federated login using either Google email accounts or Github enabled email accounts. Please ensure the email you use to register is either set up as a Google or Github account and that you use this email to log in with the appropriate service.
|
||||
|
||||
To enable your email for Google please see https://support.google.com/accounts/answer/176347?hl=en
|
||||
|
||||
To set up a Github account please see https://github.com/join
|
||||
|
||||
|
||||
Once you have been approved to join the beta you will receive an email. Follow the link in the email to sign in or click on "I have an invitation" on the https://testnet.corda.network
|
||||
|
||||
Sign in using either the Google or Github login services:
|
||||
|
||||
.. image:: resources/testnet-signin.png
|
||||
|
||||
When prompted approve the Testnet application:
|
||||
|
||||
.. image:: resources/testnet-signin-auth.png
|
||||
|
||||
At this point you may need to verify your email address is valid. If prompted check your email and click on the link to validate then return to the sign in page and sign in again.
|
||||
|
||||
Next agree to the terms of service:
|
||||
|
||||
.. image:: resources/testnet-terms.png
|
||||
|
||||
You can now choose how to deploy your Corda node to the Corda Testnet. We strongly recommend hosting your Corda node on a public cloud resource.
|
||||
|
||||
.. note:: If you host your node on your own machine or a corporate server you must ensure it is reachable from the public internet at a specific IP address. This will typically require port forwarding on your router.
|
||||
|
||||
Select the cloud provider you wish to use for documentation on how to specifically configure Corda for that environment.
|
||||
|
||||
.. image:: resources/testnet-platform-clean.png
|
||||
|
||||
Once your cloud instance is set up you can install and run your Testnet pre-provisioned Corda node by clicking on "Copy" and pasting the one time link into your cloud shell.
|
||||
|
||||
The installation script will download the Corda binaries as well as your PKI certificates, private keys and suporting files and will install and run Corda on your fresh cloud VM. Your node will register itself with the Corda Testnet when it first runs and be added to the global network map and be visible to counterparties after approximately 5 minutes.
|
||||
|
||||
Hosting a Corda node locally is possible but will require manually configuring firewall and port forwarding on your local router. If you want this option then click on the "Download" button to download a Zip file with a pre-configured Corda node.
|
||||
|
||||
A note on identities on Corda Testnet
|
||||
-------------------------------------
|
||||
|
||||
Unlike the main Corda Network, which is designed for verified real world identities, The Corda Testnet automatically assigns a "distinguished name" as your identity on the network. This is to prevent name abuse such as the use of offensive language in the names or name squatting. This allows the provision of a node to be automatic and instantaneous. It also enables the same user to safely generate many nodes without accidental name conflicts. If you require a human readable name then please contact support and a partial organsation name can be approved.
|
||||
|
120
docs/source/gcp-vm.rst
Normal file
@ -0,0 +1,120 @@
|
||||
Deploying Corda to Corda Testnet from a Google Cloud Platform VM
|
||||
================================================================
|
||||
|
||||
.. contents::
|
||||
|
||||
This document explains how to deploy a Corda node to Google Cloud Platform that can connect directly to the Corda Testnet. A self service download link can be obtained from https://testnet.corda.network. This document will describe how to set up a virtual machine on the Google Cloud Platform (GCP) to deploy your pre-configured Corda node and automatically connnect to Testnet.
|
||||
|
||||
Pre-requisites
|
||||
--------------
|
||||
* Ensure you have a registered Google Cloud Platform account with
|
||||
billing enabled (https://cloud.google.com/billing/docs/how-to/manage-billing-account) which can create virtual machines under your subscription(s) and you are logged on to the GCP console: https://console.cloud.google.com.
|
||||
|
||||
|
||||
Deploy Corda node
|
||||
-----------------
|
||||
|
||||
Browse to https://console.cloud.google.com and log in with your
|
||||
Google credentials.
|
||||
|
||||
**STEP 1: Create a GCP Project**
|
||||
|
||||
In the project drop down click on the plus icon to create a new
|
||||
project to house your Corda resources.
|
||||
|
||||
.. image:: resources/consolegcp.png
|
||||
|
||||
.. image:: resources/console2.png
|
||||
|
||||
.. image:: resources/newprojectgcp.png
|
||||
|
||||
Enter a project name and click Create.
|
||||
|
||||
**STEP 2: Launch the VM**
|
||||
|
||||
In the left hand side nav click on Compute Engine.
|
||||
|
||||
.. image:: resources/gcpcompute.png
|
||||
|
||||
Click on Create Instance.
|
||||
|
||||
.. image:: resources/consolegcpcreatevm.png
|
||||
|
||||
Fill in the form with the desired VM specs:
|
||||
|
||||
Recommended minimum 4vCPU with 15GB memory and 40GB Persistent disk.
|
||||
Ubuntu 16.04 LTS.
|
||||
|
||||
Allow full API access.
|
||||
|
||||
Dont worry about firewall settings as you will configure those later.
|
||||
|
||||
.. image:: resources/gcpconsolevmsettings.png
|
||||
|
||||
Click Create and wait a few sections for your instance to provision
|
||||
and start running.
|
||||
|
||||
**STEP 3: Connect to your VM and set up the environment**
|
||||
|
||||
Once your instance is running click on the SSH button to launch a
|
||||
cloud SSH terminal in a new window.
|
||||
|
||||
.. image:: resources/gcpconsolelaunchssh.png
|
||||
|
||||
.. image:: resources/gcpshell.png
|
||||
|
||||
Run the following to configure the firewall to allow Corda traffic
|
||||
|
||||
.. code:: bash
|
||||
|
||||
gcloud compute firewall-rules create nodetonode --allow tcp:10002
|
||||
gcloud compute firewall-rules create nodetorpc --allow tcp:10003
|
||||
gcloud compute firewall-rules create webserver --allow tcp:8080
|
||||
|
||||
|
||||
Promote the ephemeral IP address associated with this
|
||||
instance to a static IP address.
|
||||
|
||||
First check the region and select the one you are using from the list:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
gcloud compute regions list
|
||||
|
||||
Find your external IP:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
gcloud compute addresses list
|
||||
|
||||
Run this command with the ephemeral IP address as the argument to
|
||||
the --addresses flag and the region:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
gcloud compute addresses create corda-node --addresses 35.204.53.61 --region europe-west4
|
||||
|
||||
**STEP 4: Download and set up your Corda node**
|
||||
|
||||
Now your GCP environment is configured you can switch to the Testnet
|
||||
web application and click on the copy to clipboard button to get a one
|
||||
time installation script.
|
||||
|
||||
.. note:: If you have not already set up your account on Testnet then please visit https://testnet.corda.network and sign up.
|
||||
|
||||
.. image:: resources/testnet-platform.png
|
||||
|
||||
You can generate as many Testnet identites as you like by refreshing
|
||||
this page to generate a new one time link.
|
||||
|
||||
In the terminal of your cloud instance paste the command you just copied to install and run
|
||||
your unique Corda instance:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
sudo ONE_TIME_DOWNLOAD_KEY=YOUR_UNIQUE_DOWNLOAD_KEY_HERE bash -c "$(curl -L https://testnet.corda.network/api/user/node/install.sh)"
|
||||
|
||||
.. warning:: This command will execute the install script as ROOT on your cloud instance. You may wish to examine the script prior to executing it on your machine.
|
||||
|
||||
You can now navigate to the external web address of the instance and
|
||||
see any cordapps running on port 8080 (if you have any installed).
|
BIN
docs/source/resources/aws-connect.png
Normal file
After Width: | Height: | Size: 223 KiB |
BIN
docs/source/resources/aws-elastic-actions.png
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
docs/source/resources/aws-elastic.png
Normal file
After Width: | Height: | Size: 107 KiB |
BIN
docs/source/resources/aws-firewall.png
Normal file
After Width: | Height: | Size: 269 KiB |
BIN
docs/source/resources/aws-instance-type.png
Normal file
After Width: | Height: | Size: 433 KiB |
BIN
docs/source/resources/aws-instances-connect.png
Normal file
After Width: | Height: | Size: 178 KiB |
BIN
docs/source/resources/aws-instances.png
Normal file
After Width: | Height: | Size: 166 KiB |
BIN
docs/source/resources/aws-keys.png
Normal file
After Width: | Height: | Size: 216 KiB |
BIN
docs/source/resources/aws-launch.png
Normal file
After Width: | Height: | Size: 135 KiB |
BIN
docs/source/resources/aws-storage.png
Normal file
After Width: | Height: | Size: 194 KiB |
BIN
docs/source/resources/aws_select_ubuntu.png
Normal file
After Width: | Height: | Size: 406 KiB |
BIN
docs/source/resources/azure-connect-ssh.png
Normal file
After Width: | Height: | Size: 367 KiB |
BIN
docs/source/resources/azure-connect.png
Normal file
After Width: | Height: | Size: 412 KiB |
BIN
docs/source/resources/azure-create-vm.png
Normal file
After Width: | Height: | Size: 436 KiB |
BIN
docs/source/resources/azure-instance-type.png
Normal file
After Width: | Height: | Size: 188 KiB |
BIN
docs/source/resources/azure-networking.png
Normal file
After Width: | Height: | Size: 422 KiB |
BIN
docs/source/resources/azure-nsg-2.png
Normal file
After Width: | Height: | Size: 174 KiB |
BIN
docs/source/resources/azure-nsg.png
Normal file
After Width: | Height: | Size: 338 KiB |
BIN
docs/source/resources/azure-port-rule.png
Normal file
After Width: | Height: | Size: 484 KiB |
BIN
docs/source/resources/azure-rg-2.png
Normal file
After Width: | Height: | Size: 120 KiB |
BIN
docs/source/resources/azure-rg.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
docs/source/resources/azure-screen-form.png
Normal file
After Width: | Height: | Size: 283 KiB |
BIN
docs/source/resources/azure-select-ubuntu.png
Normal file
After Width: | Height: | Size: 310 KiB |
BIN
docs/source/resources/azure-set-static-ip.png
Normal file
After Width: | Height: | Size: 460 KiB |
BIN
docs/source/resources/azure-settings-ok.png
Normal file
After Width: | Height: | Size: 331 KiB |
BIN
docs/source/resources/azure-shell.png
Normal file
After Width: | Height: | Size: 637 KiB |
BIN
docs/source/resources/azure-ssh.png
Normal file
After Width: | Height: | Size: 200 KiB |
BIN
docs/source/resources/azure-vm-form.png
Normal file
After Width: | Height: | Size: 288 KiB |
BIN
docs/source/resources/azure-vm-settings.png
Normal file
After Width: | Height: | Size: 342 KiB |
BIN
docs/source/resources/azure-vm-spec.png
Normal file
After Width: | Height: | Size: 387 KiB |
BIN
docs/source/resources/console2.png
Normal file
After Width: | Height: | Size: 519 KiB |
BIN
docs/source/resources/consolegcp.png
Normal file
After Width: | Height: | Size: 869 KiB |
BIN
docs/source/resources/consolegcpcreatevm.png
Normal file
After Width: | Height: | Size: 264 KiB |
BIN
docs/source/resources/gcpcompute.png
Normal file
After Width: | Height: | Size: 362 KiB |
BIN
docs/source/resources/gcpconsolelaunchssh.png
Normal file
After Width: | Height: | Size: 255 KiB |
BIN
docs/source/resources/gcpconsolevmsettings.png
Normal file
After Width: | Height: | Size: 317 KiB |
BIN
docs/source/resources/gcpshell.png
Normal file
After Width: | Height: | Size: 250 KiB |
BIN
docs/source/resources/newprojectgcp.png
Normal file
After Width: | Height: | Size: 110 KiB |
BIN
docs/source/resources/testnet-account-type.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
docs/source/resources/testnet-form.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
docs/source/resources/testnet-landing.png
Normal file
After Width: | Height: | Size: 3.5 MiB |
BIN
docs/source/resources/testnet-platform-clean.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
docs/source/resources/testnet-platform.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
docs/source/resources/testnet-signin-auth.png
Normal file
After Width: | Height: | Size: 3.4 MiB |
BIN
docs/source/resources/testnet-signin.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
docs/source/resources/testnet-terms.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
@ -31,7 +31,7 @@ class CashExceptionSerialisationTest : IntegrationTest() {
|
||||
|
||||
@Test
|
||||
fun `cash exception with a cause can be serialised with AMQP`() {
|
||||
driver(DriverParameters(startNodesInProcess = true)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, notarySpecs = emptyList())) {
|
||||
val node = startNode(rpcUsers = listOf(User("mark", "dadada", setOf(all())))).getOrThrow()
|
||||
val action = { node.rpc.startFlow(::CashExceptionThrowingFlow).returnValue.getOrThrow() }
|
||||
assertThatThrownBy(action).isInstanceOfSatisfying(CashException::class.java) { thrown ->
|
||||
|
@ -18,6 +18,7 @@ import net.corda.testing.core.ALICE_NAME
|
||||
import net.corda.testing.core.BOB_NAME
|
||||
import net.corda.testing.core.DUMMY_BANK_A_NAME
|
||||
import net.corda.testing.core.DUMMY_NOTARY_NAME
|
||||
import net.corda.testing.driver.DriverParameters
|
||||
import net.corda.testing.driver.driver
|
||||
import net.corda.testing.internal.IntegrationTest
|
||||
import net.corda.testing.internal.IntegrationTestSchemas
|
||||
@ -35,7 +36,7 @@ class CashConfigDataFlowTest : IntegrationTest() {
|
||||
}
|
||||
@Test
|
||||
fun `issuable currencies are read in from node config`() {
|
||||
driver {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val node = startNode(customOverrides = mapOf("custom" to mapOf("issuableCurrencies" to listOf("EUR", "USD")))).getOrThrow()
|
||||
val config = node.rpc.startFlow(::CashConfigDataFlow).returnValue.getOrThrow()
|
||||
assertThat(config.issuableCurrencies).containsExactly(EUR, USD)
|
||||
|
@ -44,30 +44,15 @@ import java.io.ObjectOutputStream
|
||||
import java.io.Serializable
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class BootTests : IntegrationTest() {
|
||||
companion object {
|
||||
@ClassRule
|
||||
@JvmField
|
||||
val databaseSchemas = IntegrationTestSchemas(ALICE_NAME.toDatabaseSchemaName(), BOB_NAME.toDatabaseSchemaName(), DUMMY_NOTARY_NAME.toDatabaseSchemaName())
|
||||
}
|
||||
|
||||
class BootTests {
|
||||
@Test
|
||||
fun `java deserialization is disabled`() {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val user = User("u", "p", setOf(startFlow<ObjectInputStreamFlow>()))
|
||||
val params = NodeParameters(rpcUsers = listOf(user))
|
||||
|
||||
fun NodeHandle.attemptJavaDeserialization() {
|
||||
CordaRPCClient(rpcAddress).use(user.username, user.password) { connection ->
|
||||
connection.proxy
|
||||
rpc.startFlow(::ObjectInputStreamFlow).returnValue.getOrThrow()
|
||||
}
|
||||
}
|
||||
driver {
|
||||
val devModeNode = startNode(params, BOB_NAME).getOrThrow()
|
||||
val node = startNode(ALICE_NAME, devMode = false, parameters = params).getOrThrow()
|
||||
|
||||
assertThatThrownBy { devModeNode.attemptJavaDeserialization() }.isInstanceOf(CordaRuntimeException::class.java)
|
||||
assertThatThrownBy { node.attemptJavaDeserialization() }.isInstanceOf(InternalNodeException::class.java)
|
||||
val future = CordaRPCClient(startNode(rpcUsers = listOf(user)).getOrThrow().rpcAddress).
|
||||
start(user.username, user.password).proxy.startFlow(::ObjectInputStreamFlow).returnValue
|
||||
assertThatThrownBy { future.getOrThrow() }
|
||||
.isInstanceOf(CordaRuntimeException::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import net.corda.testing.core.ALICE_NAME
|
||||
import net.corda.testing.core.BOB_NAME
|
||||
import net.corda.testing.core.DUMMY_NOTARY_NAME
|
||||
import net.corda.testing.core.singleIdentity
|
||||
import net.corda.testing.driver.DriverParameters
|
||||
import net.corda.testing.driver.driver
|
||||
import net.corda.testing.internal.IntegrationTest
|
||||
import net.corda.testing.internal.IntegrationTestSchemas
|
||||
@ -44,7 +45,7 @@ class CordappScanningDriverTest : IntegrationTest() {
|
||||
fun `sub-classed initiated flow pointing to the same initiating flow as its super-class`() {
|
||||
val user = User("u", "p", setOf(startFlow<ReceiveFlow>()))
|
||||
// The driver will automatically pick up the annotated flows below
|
||||
driver {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val (alice, bob) = listOf(
|
||||
startNode(providedName = ALICE_NAME, rpcUsers = listOf(user)),
|
||||
startNode(providedName = BOB_NAME)).transpose().getOrThrow()
|
||||
|
@ -24,6 +24,7 @@ import net.corda.testing.internal.IntegrationTestSchemas
|
||||
import net.corda.testing.internal.toDatabaseSchemaName
|
||||
import org.junit.Assert
|
||||
import org.junit.ClassRule
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.TimeUnit
|
||||
@ -38,16 +39,16 @@ class NodeUnloadHandlerTests : IntegrationTest() {
|
||||
|
||||
@Test
|
||||
fun `should be able to register run on stop lambda`() {
|
||||
driver(DriverParameters(startNodesInProcess = true, extraCordappPackagesToScan = listOf("net.corda.node"))) {
|
||||
driver(DriverParameters(startNodesInProcess = true, extraCordappPackagesToScan = listOf("net.corda.node"), notarySpecs = emptyList())) {
|
||||
startNode(providedName = DUMMY_BANK_A_NAME).getOrThrow()
|
||||
// just want to fall off the end of this for the mo...
|
||||
}
|
||||
Assert.assertTrue("Timed out waiting for AbstractNode to invoke the test service shutdown callback", latch.await(30, TimeUnit.SECONDS))
|
||||
assertTrue("Timed out waiting for AbstractNode to invoke the test service shutdown callback", latch.await(30, TimeUnit.SECONDS))
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
@CordaService
|
||||
class RunOnStopTestService(serviceHub: ServiceHub) : SingletonSerializeAsToken() {
|
||||
|
||||
companion object {
|
||||
private val log = contextLogger()
|
||||
}
|
||||
@ -56,7 +57,7 @@ class NodeUnloadHandlerTests : IntegrationTest() {
|
||||
serviceHub.registerUnloadHandler(this::shutdown)
|
||||
}
|
||||
|
||||
fun shutdown() {
|
||||
private fun shutdown() {
|
||||
log.info("shutting down")
|
||||
latch.countDown()
|
||||
}
|
||||
|
@ -46,11 +46,13 @@ class FlowRetryTest : IntegrationTest() {
|
||||
val numSessions = 2
|
||||
val numIterations = 10
|
||||
val user = User("mark", "dadada", setOf(Permissions.startFlow<InitiatorFlow>()))
|
||||
val result: Any? = driver(DriverParameters(startNodesInProcess = isQuasarAgentSpecified(),
|
||||
portAllocation = RandomFree)) {
|
||||
|
||||
val nodeAHandle = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user)).getOrThrow()
|
||||
val nodeBHandle = startNode(providedName = BOB_NAME, rpcUsers = listOf(user)).getOrThrow()
|
||||
val result: Any? = driver(DriverParameters(
|
||||
startNodesInProcess = isQuasarAgentSpecified(),
|
||||
portAllocation = RandomFree,
|
||||
notarySpecs = emptyList()
|
||||
)) {
|
||||
val nodeAHandle = startNode(rpcUsers = listOf(user)).getOrThrow()
|
||||
val nodeBHandle = startNode(rpcUsers = listOf(user)).getOrThrow()
|
||||
|
||||
val result = CordaRPCClient(nodeAHandle.rpcAddress).start(user.username, user.password).use {
|
||||
it.proxy.startFlow(::InitiatorFlow, numSessions, numIterations, nodeBHandle.nodeInfo.singleIdentity()).returnValue.getOrThrow()
|
||||
|
@ -68,9 +68,7 @@ class P2PFlowsDrainingModeTest : IntegrationTest() {
|
||||
|
||||
@Test
|
||||
fun `flows draining mode suspends consumption of initial session messages`() {
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = false, portAllocation = portAllocation)) {
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = false, portAllocation = portAllocation, notarySpecs = emptyList())) {
|
||||
val initiatedNode = startNode(providedName = ALICE_NAME).getOrThrow()
|
||||
val initiating = startNode(providedName = BOB_NAME, rpcUsers = users).getOrThrow().rpc
|
||||
val counterParty = initiatedNode.nodeInfo.singleIdentity()
|
||||
@ -100,9 +98,7 @@ class P2PFlowsDrainingModeTest : IntegrationTest() {
|
||||
|
||||
@Test
|
||||
fun `clean shutdown by draining`() {
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = portAllocation)) {
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = portAllocation, notarySpecs = emptyList())) {
|
||||
val nodeA = startNode(providedName = ALICE_NAME, rpcUsers = users).getOrThrow()
|
||||
val nodeB = startNode(providedName = BOB_NAME, rpcUsers = users).getOrThrow()
|
||||
var successful = false
|
||||
|
@ -44,11 +44,8 @@ class RpcFlowsDrainingModeTest : IntegrationTest() {
|
||||
|
||||
@Test
|
||||
fun `flows draining mode rejects start flows commands through rpc`() {
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = false, portAllocation = portAllocation)) {
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = false, portAllocation = portAllocation, notarySpecs = emptyList())) {
|
||||
startNode(rpcUsers = users).getOrThrow().rpc.apply {
|
||||
|
||||
setFlowsDrainingModeEnabled(true)
|
||||
|
||||
val error: Throwable? = catchThrowable { startFlow(RpcFlowsDrainingModeTest::NoOpFlow) }
|
||||
@ -61,10 +58,8 @@ class RpcFlowsDrainingModeTest : IntegrationTest() {
|
||||
|
||||
@StartableByRPC
|
||||
class NoOpFlow : FlowLogic<Unit>() {
|
||||
|
||||
@Suspendable
|
||||
override fun call() {
|
||||
|
||||
println("NO OP!")
|
||||
}
|
||||
}
|
||||
|
@ -123,8 +123,9 @@ class AttachmentLoadingTests : IntegrationTest() {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test that attachments retrieved over the network are not used for code`() = withoutTestSerialization {
|
||||
driver(DriverParameters(startNodesInProcess = true)) {
|
||||
fun `test that attachments retrieved over the network are not used for code`() {
|
||||
withoutTestSerialization {
|
||||
driver(DriverParameters(startNodesInProcess = true, notarySpecs = emptyList())) {
|
||||
installIsolatedCordappTo(bankAName)
|
||||
val (bankA, bankB) = createTwoNodes()
|
||||
assertFailsWith<CordaRuntimeException>("Party C=CH,L=Zurich,O=BankB rejected session request: Don't know net.corda.finance.contracts.isolated.IsolatedDummyFlow\$Initiator") {
|
||||
@ -133,15 +134,17 @@ class AttachmentLoadingTests : IntegrationTest() {
|
||||
}
|
||||
Unit
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `tests that if the attachment is loaded on both sides already that a flow can run`() = withoutTestSerialization {
|
||||
fun `tests that if the attachment is loaded on both sides already that a flow can run`() {
|
||||
withoutTestSerialization {
|
||||
driver {
|
||||
installIsolatedCordappTo(bankAName)
|
||||
installIsolatedCordappTo(bankBName)
|
||||
val (bankA, bankB) = createTwoNodes()
|
||||
bankA.rpc.startFlowDynamic(flowInitiatorClass, bankB.nodeInfo.legalIdentities.first()).returnValue.getOrThrow()
|
||||
}
|
||||
Unit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class RpcSslTest : IntegrationTest() {
|
||||
val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert)
|
||||
val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password")
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree, notarySpecs = emptyList())) {
|
||||
val node = startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow()
|
||||
val client = CordaRPCClient.createWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions)
|
||||
val connection = client.start(user.username, user.password)
|
||||
@ -108,7 +108,7 @@ class RpcSslTest : IntegrationTest() {
|
||||
val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert1)
|
||||
val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password")
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree, notarySpecs = emptyList())) {
|
||||
val node = startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow()
|
||||
Assertions.assertThatThrownBy {
|
||||
val connection = CordaRPCClient.createWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions).start(user.username, user.password)
|
||||
@ -128,7 +128,7 @@ class RpcSslTest : IntegrationTest() {
|
||||
fun `RPC client not using ssl can run commands`() {
|
||||
val user = User("mark", "dadada", setOf(all()))
|
||||
var successful = false
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree, notarySpecs = emptyList())) {
|
||||
val node = startNode(rpcUsers = listOf(user)).getOrThrow()
|
||||
val connection = CordaRPCClient(node.rpcAddress).start(user.username, user.password)
|
||||
connection.proxy.apply {
|
||||
@ -148,7 +148,7 @@ class RpcSslTest : IntegrationTest() {
|
||||
val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert)
|
||||
val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password")
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree, notarySpecs = emptyList())) {
|
||||
val node = startNode(customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow()
|
||||
val client = CordaRPCClient.createWithSsl(node.rpcAddress, sslConfiguration = clientSslOptions)
|
||||
|
||||
|
@ -43,7 +43,7 @@ class HardRestartTest : IntegrationTest() {
|
||||
|
||||
@StartableByRPC
|
||||
@InitiatingFlow
|
||||
class Ping(val pongParty: Party, val times: Int) : FlowLogic<Unit>() {
|
||||
class Ping(private val pongParty: Party, val times: Int) : FlowLogic<Unit>() {
|
||||
@Suspendable
|
||||
override fun call() {
|
||||
val pongSession = initiateFlow(pongParty)
|
||||
@ -56,7 +56,7 @@ class HardRestartTest : IntegrationTest() {
|
||||
}
|
||||
|
||||
@InitiatedBy(Ping::class)
|
||||
class Pong(val pingSession: FlowSession) : FlowLogic<Unit>() {
|
||||
class Pong(private val pingSession: FlowSession) : FlowLogic<Unit>() {
|
||||
@Suspendable
|
||||
override fun call() {
|
||||
val times = pingSession.sendAndReceive<Int>(Unit).unwrap { it }
|
||||
@ -70,7 +70,12 @@ class HardRestartTest : IntegrationTest() {
|
||||
@Test
|
||||
fun restartShortPingPongFlowRandomly() {
|
||||
val demoUser = User("demo", "demo", setOf(Permissions.startFlow<Ping>(), Permissions.all()))
|
||||
driver(DriverParameters(startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) {
|
||||
driver(DriverParameters(
|
||||
startNodesInProcess = false,
|
||||
inMemoryDB = false,
|
||||
notarySpecs = emptyList(),
|
||||
systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString())
|
||||
)) {
|
||||
val (a, b) = listOf(
|
||||
startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:30000")),
|
||||
startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:40000"))
|
||||
@ -102,7 +107,12 @@ class HardRestartTest : IntegrationTest() {
|
||||
@Test
|
||||
fun restartLongPingPongFlowRandomly() {
|
||||
val demoUser = User("demo", "demo", setOf(Permissions.startFlow<Ping>(), Permissions.all()))
|
||||
driver(DriverParameters(startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) {
|
||||
driver(DriverParameters(
|
||||
startNodesInProcess = false,
|
||||
inMemoryDB = false,
|
||||
notarySpecs = emptyList(),
|
||||
systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString())
|
||||
)) {
|
||||
val (a, b) = listOf(
|
||||
startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:30000")),
|
||||
startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:40000"))
|
||||
@ -134,7 +144,12 @@ class HardRestartTest : IntegrationTest() {
|
||||
@Test
|
||||
fun softRestartLongPingPongFlowRandomly() {
|
||||
val demoUser = User("demo", "demo", setOf(Permissions.startFlow<Ping>(), Permissions.all()))
|
||||
driver(DriverParameters(startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) {
|
||||
driver(DriverParameters(
|
||||
startNodesInProcess = false,
|
||||
inMemoryDB = false,
|
||||
notarySpecs = emptyList(),
|
||||
systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString())
|
||||
)) {
|
||||
val (a, b) = listOf(
|
||||
startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:30000")),
|
||||
startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:40000"))
|
||||
@ -197,20 +212,25 @@ class HardRestartTest : IntegrationTest() {
|
||||
|
||||
@InitiatingFlow
|
||||
@InitiatedBy(RecursiveA::class)
|
||||
class RecursiveB(val otherSession: FlowSession) : FlowLogic<Unit>() {
|
||||
class RecursiveB(private val otherSession: FlowSession) : FlowLogic<Unit>() {
|
||||
@Suspendable
|
||||
override fun call() {
|
||||
val depth = otherSession.receive<Int>().unwrap { it }
|
||||
val newSession = initiateFlow(otherSession.counterparty)
|
||||
val string = newSession.sendAndReceive<String>(depth - 1).unwrap { it }
|
||||
otherSession.send(string + ":" + depth)
|
||||
otherSession.send("$string:$depth")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun restartRecursiveFlowRandomly() {
|
||||
val demoUser = User("demo", "demo", setOf(Permissions.startFlow<RecursiveA>(), Permissions.all()))
|
||||
driver(DriverParameters(startNodesInProcess = false, inMemoryDB = false, systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString()))) {
|
||||
driver(DriverParameters(
|
||||
startNodesInProcess = false,
|
||||
inMemoryDB = false,
|
||||
notarySpecs = emptyList(),
|
||||
systemProperties = mapOf("log4j.configurationFile" to logConfigFile.toString())
|
||||
)) {
|
||||
val (a, b) = listOf(
|
||||
startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:30000")),
|
||||
startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = listOf(demoUser), customOverrides = mapOf("p2pAddress" to "localhost:40000"))
|
||||
|
@ -73,7 +73,7 @@ class DriverTests : IntegrationTest() {
|
||||
|
||||
@Test
|
||||
fun `simple node startup and shutdown`() {
|
||||
val handle = driver {
|
||||
val handle = driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val node = startNode(providedName = DUMMY_REGULATOR_NAME)
|
||||
nodeMustBeUp(node)
|
||||
}
|
||||
|
@ -62,12 +62,12 @@ class InteractiveShellIntegrationTest : IntegrationTest() {
|
||||
@JvmField
|
||||
val tempFolder = TemporaryFolder()
|
||||
|
||||
val testName = X500Principal("CN=Test,O=R3 Ltd,L=London,C=GB")
|
||||
private val testName = X500Principal("CN=Test,O=R3 Ltd,L=London,C=GB")
|
||||
|
||||
@Test
|
||||
fun `shell should not log in with invalid credentials`() {
|
||||
val user = User("u", "p", setOf())
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree, notarySpecs = emptyList())) {
|
||||
val nodeFuture = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user), startInSameProcess = true)
|
||||
val node = nodeFuture.getOrThrow()
|
||||
|
||||
@ -83,7 +83,7 @@ class InteractiveShellIntegrationTest : IntegrationTest() {
|
||||
@Test
|
||||
fun `shell should log in with valid credentials`() {
|
||||
val user = User("u", "p", setOf())
|
||||
driver {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val nodeFuture = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user), startInSameProcess = true)
|
||||
val node = nodeFuture.getOrThrow()
|
||||
|
||||
@ -108,7 +108,7 @@ class InteractiveShellIntegrationTest : IntegrationTest() {
|
||||
val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert)
|
||||
val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password")
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree, notarySpecs = emptyList())) {
|
||||
startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow().use { node ->
|
||||
|
||||
val conf = ShellConfiguration(commandsDirectory = Files.createTempDir().toPath(),
|
||||
@ -136,7 +136,7 @@ class InteractiveShellIntegrationTest : IntegrationTest() {
|
||||
val trustStorePath = saveToTrustStore(tempFolder.root.toPath() / "truststore.jks", cert1)
|
||||
val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password")
|
||||
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree, notarySpecs = emptyList())) {
|
||||
startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow().use { node ->
|
||||
|
||||
val conf = ShellConfiguration(commandsDirectory = Files.createTempDir().toPath(),
|
||||
@ -153,7 +153,7 @@ class InteractiveShellIntegrationTest : IntegrationTest() {
|
||||
|
||||
@Test
|
||||
fun `internal shell user should not be able to connect if node started with devMode=false`() {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree, notarySpecs = emptyList())) {
|
||||
startNode().getOrThrow().use { node ->
|
||||
val conf = (node as NodeHandleInternal).configuration.toShellConfig()
|
||||
InteractiveShell.startShellInternal(conf)
|
||||
@ -168,7 +168,7 @@ class InteractiveShellIntegrationTest : IntegrationTest() {
|
||||
val user = User("u", "p", setOf(Permissions.startFlow<SSHServerTest.FlowICanRun>(),
|
||||
Permissions.invokeRpc(CordaRPCOps::registeredFlows),
|
||||
Permissions.invokeRpc(CordaRPCOps::nodeInfo)))
|
||||
driver {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val nodeFuture = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user), startInSameProcess = true)
|
||||
val node = nodeFuture.getOrThrow()
|
||||
|
||||
@ -219,7 +219,7 @@ class InteractiveShellIntegrationTest : IntegrationTest() {
|
||||
val clientSslOptions = ClientRpcSslOptions(trustStorePath, "password")
|
||||
|
||||
var successful = false
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree)) {
|
||||
driver(DriverParameters(startNodesInProcess = true, portAllocation = RandomFree, notarySpecs = emptyList())) {
|
||||
startNode(rpcUsers = listOf(user), customOverrides = brokerSslOptions.useSslRpcOverrides()).getOrThrow().use { node ->
|
||||
|
||||
val conf = ShellConfiguration(commandsDirectory = Files.createTempDir().toPath(),
|
||||
|
@ -37,7 +37,6 @@ import org.bouncycastle.util.io.Streams
|
||||
import org.junit.ClassRule
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import java.lang.Thread.sleep
|
||||
import java.net.ConnectException
|
||||
import kotlin.test.assertTrue
|
||||
import kotlin.test.fail
|
||||
@ -53,7 +52,7 @@ class SSHServerTest : IntegrationTest() {
|
||||
fun `ssh server does not start be default`() {
|
||||
val user = User("u", "p", setOf())
|
||||
// The driver will automatically pick up the annotated flows below
|
||||
driver {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val node = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user))
|
||||
node.getOrThrow()
|
||||
|
||||
@ -74,7 +73,7 @@ class SSHServerTest : IntegrationTest() {
|
||||
fun `ssh server starts when configured`() {
|
||||
val user = User("u", "p", setOf())
|
||||
// The driver will automatically pick up the annotated flows below
|
||||
driver {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val node = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user),
|
||||
customOverrides = mapOf("sshd" to mapOf("port" to 2222)) /*, startInSameProcess = true */)
|
||||
node.getOrThrow()
|
||||
@ -93,7 +92,7 @@ class SSHServerTest : IntegrationTest() {
|
||||
fun `ssh server verify credentials`() {
|
||||
val user = User("u", "p", setOf())
|
||||
// The driver will automatically pick up the annotated flows below
|
||||
driver {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val node = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user),
|
||||
customOverrides = mapOf("sshd" to mapOf("port" to 2222)))
|
||||
node.getOrThrow()
|
||||
@ -117,7 +116,7 @@ class SSHServerTest : IntegrationTest() {
|
||||
val user = User("u", "p", setOf(startFlow<FlowICanRun>(),
|
||||
invokeRpc(CordaRPCOps::wellKnownPartyFromX500Name)))
|
||||
// The driver will automatically pick up the annotated flows below
|
||||
driver {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val node = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user),
|
||||
customOverrides = mapOf("sshd" to mapOf("port" to 2222)))
|
||||
node.getOrThrow()
|
||||
@ -146,7 +145,7 @@ class SSHServerTest : IntegrationTest() {
|
||||
fun `ssh runs flows`() {
|
||||
val user = User("u", "p", setOf(startFlow<FlowICanRun>()))
|
||||
// The driver will automatically pick up the annotated flows below
|
||||
driver {
|
||||
driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val node = startNode(providedName = ALICE_NAME, rpcUsers = listOf(user),
|
||||
customOverrides = mapOf("sshd" to mapOf("port" to 2222)))
|
||||
node.getOrThrow()
|
||||
@ -191,9 +190,10 @@ class SSHServerTest : IntegrationTest() {
|
||||
override val progressTracker: ProgressTracker? = ProgressTracker(HELLO_STEP)
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
@StartableByRPC
|
||||
@InitiatingFlow
|
||||
class FlowICannotRun(val otherParty: Party) : FlowLogic<String>() {
|
||||
class FlowICannotRun(private val otherParty: Party) : FlowLogic<String>() {
|
||||
@Suspendable
|
||||
override fun call(): String = initiateFlow(otherParty).receive<String>().unwrap { it }
|
||||
|
||||
|
@ -18,6 +18,7 @@ import net.corda.testing.core.DUMMY_BANK_A_NAME
|
||||
import net.corda.testing.core.DUMMY_NOTARY_NAME
|
||||
import net.corda.testing.internal.IntegrationTest
|
||||
import net.corda.testing.internal.IntegrationTestSchemas
|
||||
import net.corda.testing.driver.DriverParameters
|
||||
import net.corda.testing.driver.WebserverHandle
|
||||
import net.corda.testing.driver.driver
|
||||
import net.corda.testing.node.internal.addressMustBeBound
|
||||
@ -47,7 +48,7 @@ class WebserverDriverTests : IntegrationTest() {
|
||||
|
||||
@Test
|
||||
fun `starting a node and independent web server works`() {
|
||||
val addr = driver {
|
||||
val addr = driver(DriverParameters(notarySpecs = emptyList())) {
|
||||
val node = startNode(providedName = DUMMY_BANK_A_NAME).getOrThrow()
|
||||
val webserverHandle = startWebserver(node).getOrThrow()
|
||||
webserverMustBeUp(webserverHandle)
|
||||
|