change to use script and not old jar file
@@ -11,6 +11,7 @@ import com.quorum.tessera.encryption.PrivateKey;
import com.quorum.tessera.encryption.PublicKey;
import com.quorum.tessera.encryption.SharedKey;
import com.quorum.tessera.encryption.Encryptor;
+import exec.ExecArgsBuilder;
import io.cucumber.java8.En;
import java.nio.file.Files;
@@ -58,17 +59,13 @@ public class FileKeygenSteps implements En {
throw new IllegalStateException("No application.jar system property defined");
}
- final Path applicationJar = Paths.get(appPath);
-
- this.args =
- new ArrayList<>(
- Arrays.asList(
- "java",
- "-jar",
- applicationJar.toString(),
- "-keygen",
- "--encryptor.type",
- "NACL"));
+ final Path startScript = Paths.get(appPath);
+
+ this.args = new ExecArgsBuilder()
+ .withStartScriptOrJarFile(startScript)
+ .withArg("-keygen")
+ .withArg("--encryptor.type","NACL")
+ .build();
});
Given("no file exists at {string}", (String path) -> Files.deleteIfExists(Paths.get(path)));
