@@ -74,6 +74,7 @@ task createClientKeyStore(type: LoggedExec) {
7474// Export the node's certificate
7575File nodeCertificate = new File (keystoreDir, ' test-node.cert' )
7676task exportNodeCertificate (type : LoggedExec ) {
77+ dependsOn createNodeKeyStore
7778 doFirst {
7879 if (nodeCertificate. parentFile. exists() == false ) {
7980 nodeCertificate. parentFile. mkdirs()
@@ -92,7 +93,7 @@ task exportNodeCertificate(type: LoggedExec) {
9293
9394// Import the node certificate in the client's keystore
9495task importNodeCertificateInClientKeyStore (type : LoggedExec ) {
95- dependsOn exportNodeCertificate
96+ dependsOn createClientKeyStore, exportNodeCertificate
9697 executable = new File (project. runtimeJavaHome, ' bin/keytool' )
9798 args ' -import' ,
9899 ' -alias' , ' test-node' ,
@@ -105,6 +106,7 @@ task importNodeCertificateInClientKeyStore(type: LoggedExec) {
105106// Export the client's certificate
106107File clientCertificate = new File (keystoreDir, ' test-client.cert' )
107108task exportClientCertificate (type : LoggedExec ) {
109+ dependsOn createClientKeyStore
108110 doFirst {
109111 if (clientCertificate. parentFile. exists() == false ) {
110112 clientCertificate. parentFile. mkdirs()
@@ -123,7 +125,7 @@ task exportClientCertificate(type: LoggedExec) {
123125
124126// Import the client certificate in the node's keystore
125127task importClientCertificateInNodeKeyStore (type : LoggedExec ) {
126- dependsOn exportClientCertificate
128+ dependsOn createNodeKeyStore, exportClientCertificate
127129 executable = new File (project. runtimeJavaHome, ' bin/keytool' )
128130 args ' -import' ,
129131 ' -alias' , ' test-client' ,
@@ -139,10 +141,7 @@ forbiddenPatterns {
139141
140142// Add keystores to test classpath: it expects it there
141143sourceSets. test. resources. srcDir(keystoreDir)
142- processTestResources. dependsOn(
143- createNodeKeyStore, createClientKeyStore,
144- importNodeCertificateInClientKeyStore, importClientCertificateInNodeKeyStore
145- )
144+ processTestResources. dependsOn(importNodeCertificateInClientKeyStore, importClientCertificateInNodeKeyStore)
146145
147146integTestCluster. dependsOn(importClientCertificateInNodeKeyStore)
148147
0 commit comments