Skip to content

Commit

Permalink
TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury-Fridlyand committed Oct 3, 2024
1 parent 587ac35 commit 9f2a25c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
20 changes: 17 additions & 3 deletions java/DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ To run end-to-end tests, use the following command:
./gradlew :integTest:test
```
IT suite start the server for testing - standalone and cluster installation using `cluster_manager` script.
By default, it starts servers without TLS; to activate TLS add `-Dtls=true` to the command line:
```bash
./gradlew :integTest:test -Dtls=true
```
To run a single test, use the following command:
```bash
./gradlew :integTest:test --tests '*.functionLoad_and_functionList' --rerun
Expand All @@ -242,12 +248,20 @@ To run one class, use the following command:
./gradlew :client:test --tests 'TransactionTests' --rerun
```
IT suite start the server for testing - standalone and cluster installation using `cluster_manager` script.
If you want IT to use already started servers, use the following command line:
To run IT tests against an existing cluster and/or standalone endpoint, use:
```bash
./gradlew :integTest:test -Dcluster-endpoints=localhost:7000 -Dstandalone-endpoints=localhost:6379
```
You can use test filter there as well.
If those endpoints use TLS, add `-Dtls=true` (applied to both endpoints):
```bash
./gradlew :integTest:test -Dcluster-endpoints=localhost:7000 -Dstandalone-endpoints=localhost:6379 -Dtls=true
```
You can combine this with test filter as well:
```bash
./gradlew :integTest:test -Dcluster-endpoints=localhost:7000 -Dstandalone-endpoints=localhost:6379 --tests 'TransactionTests' -Dtls=true
```
### Generate files
To (re)generate protobuf code, use the following command:
Expand Down
8 changes: 6 additions & 2 deletions java/integTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ tasks.register('startCluster') {
new ByteArrayOutputStream().withStream { os ->
exec {
workingDir "${project.rootDir}/../utils"
commandLine 'python3', 'cluster_manager.py', 'start', '--cluster-mode'
def args = ['python3', 'cluster_manager.py', 'start', '--cluster-mode']
if (System.getProperty("tls") == 'true') args.add(2, '--tls')
commandLine args
standardOutput = os
}
clusterHosts = extractAddressesFromClusterManagerOutput(os.toString())
Expand All @@ -87,7 +89,9 @@ tasks.register('startStandalone') {
new ByteArrayOutputStream().withStream { os ->
exec {
workingDir "${project.rootDir}/../utils"
commandLine 'python3', 'cluster_manager.py', 'start', '-r', '0'
def args = ['python3', 'cluster_manager.py', 'start', '-r', '0']
if (System.getProperty("tls") == 'true') args.add(2, '--tls')
commandLine args
standardOutput = os
}
standaloneHosts = extractAddressesFromClusterManagerOutput(os.toString())
Expand Down

0 comments on commit 9f2a25c

Please sign in to comment.