solution: organize the integration test suite
This commit is contained in:
@@ -11,36 +11,70 @@ Test for a correct work using a simulation of different upstream behaviours and
|
||||
|
||||
NOTE: Run commands in project's root dir
|
||||
|
||||
NOTE: You need to open multiple consoles, since each command runs on foreground
|
||||
|
||||
== Basic Test
|
||||
|
||||
Makes some basic checks with a mocked upstreams
|
||||
|
||||
=== Run upstream emulator
|
||||
|
||||
.Runs two instances of RPC server
|
||||
[source,bash]
|
||||
----
|
||||
cd testing/simple-upstream && ./gradlew run
|
||||
----
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
cd testing/simple-upstream && DSHACKLE_TESTUP_PORT=18546 ./gradlew run
|
||||
DSHACKLE_TESTUP_PORT=18545 ./gradlew -p testing/simple-upstream run
|
||||
DSHACKLE_TESTUP_PORT=18546 ./gradlew -p testing/simple-upstream run
|
||||
----
|
||||
|
||||
=== Run Dshackle
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
./gradlew run --args="--configPath=./testing/dshackle/dshackle.yaml"
|
||||
----
|
||||
|
||||
or, if you want to make sure you compile and use version with your latest changes (usually unnecessary, but still):
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
./gradlew clean compileKotlin run --args="--configPath=./testing/dshackle/dshackle.yaml"
|
||||
./gradlew run --args="--configPath=./testing/dshackle/dshackle-basic.yaml"
|
||||
----
|
||||
|
||||
=== Run tests
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
cd testing/trial && ./gradlew check
|
||||
./testing/trial/gradlew -p testing/trial -PdshackleTrialMode=basic cleanTest test
|
||||
----
|
||||
|
||||
== Real (Mainnet) Test
|
||||
|
||||
=== Run Dshackle
|
||||
|
||||
First you have to provide configuration to an upstream connected to the mainnet.
|
||||
It may be a local Geth instance, or an other provider, like Infura (note that the test config doesn't support TLS or other auth)
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
export DSHACKLE_TEST_ETH1_RPC=
|
||||
export DSHACKLE_TEST_ETH1_WS=
|
||||
export DSHACKLE_TEST_ETH1_WSORIGIN=
|
||||
----
|
||||
|
||||
For a local Geth it would be:
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
export DSHACKLE_TEST_ETH1_RPC=http://127.0.0.1:8545
|
||||
export DSHACKLE_TEST_ETH1_WS=ws://127.0.0.1:8546
|
||||
export DSHACKLE_TEST_ETH1_WSORIGIN=http://127.0.0.1:8546
|
||||
----
|
||||
|
||||
Finally, run the dDshackle instance:
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
./gradlew run --args="--configPath=./testing/dshackle/dshackle-real.yaml"
|
||||
----
|
||||
|
||||
=== Run tests
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
./testing/trial/gradlew -p testing/trial -PdshackleTrialMode=real cleanTest test
|
||||
----
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user