Consensys / quorum-acceptance-tests

Acceptance Tests for Quorum
https://github.com/ConsenSys/quorum-acceptance-tests#readme
Apache License 2.0
11 stars 21 forks source link
docker features gauge protocols-team-goquorum quorum test

Standard Acceptance Tests Extra Acceptance Tests

Quick Start

Development

Development environment requires the following:

With built-in provisioning feature:

For more details on tools and versions being used, please refer to Dockerfile

Writing Tests

Running Tests

With auto-provisioning network

:bulb: Tag networks/typical::raft means:

  • Executing tests which are tagged with the value
  • Instructing Maven to provision networks/typical with profile raft when using Maven Profile auto (i.e.: -Pauto)
  • networks/typical is a folder that contains Terraform configuration to provision the network

Below is the summary of various parameters:

Parameters Description
-Dnetwork.target="<folder>::<profile" Shorthand to specify the Terraform folder and profile being used to create GoQuorum Network
-Dnetwork.folder="<folder>" Terraform folder being used to create GoQuorum Network
-Dnetwork.profile="<profile>" Terraform workspace and terraform.<profile>.tfvars being used
-Dnetwork.forceDestroy Destroy the GoQuorum Network after test completed. Default is false
-Dnetwork.skipApply Don't create GoQuorum Network. Default is false
-Dnetwork.skipWait Don't perform health check and wait for GoQuorum Network. Default is false
-Dinfra.target="<folder>::<profile" Shorthand to specify the Terraform folder and profile being used to create an infrastructure to host Docker Engine
-Dinfra.folder="<folder>" Terraform folder being used to create the infrastructure
-Dinfra.profile="<profile>" Terraform workspace and terraform.<profile>.tfvars being used
-Dinfra.forceDestroy Destroy the infrastructure after test completed. Default is false
-Dinfra.skipApply Don't create the infrastructure. Default is false
-Dinfra.skipWait Don't perform health check and wait for GoQuorum Network. Default is false
-DskipToolsCheck Don't check local tools required to run tests. Default is false
-DskipGenerateSol Don't generate Java stubs for Solidity files. Default is false. When running Permission spec, this should not be set to true as the spec depends on version of Solidity files

With local binaries

In order to run acceptance tests during GoQuorum/Tessera development:

With custom GoQuorum/Tessera Docker images

By default, official Docker images quorumengineering/quorum:develop and quorumengineering/tessera:develop in Docker Hub will be used. If you need to use your custom images, please follow the below guides:

With existing quorum-examples network

SPRING_PROFILES_ACTIVE=local.7nodes ./mvnw clean test -Dtags="basic || basic-raft || networks/typical::raft"

Remote Docker

:information_source: Because Docker Java SDK doesn't support SSH transport hence we need to open TCP endpoint.

networks/_infra/aws-ec2 provides Terraform configuration in order to spin off an EC2 instance with remote Docker API support.

E.g.: To start networks/typical with remote Docker infrastructure:

Logging


Gauge Badge