Created
March 31, 2015 10:22
-
-
Save Slakah/99e8b915abbcfcad7274 to your computer and use it in GitHub Desktop.
To make gatling use the JAVA_OPTS environment variable for ssl settings, copy this into your build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy JVM ssl settings to be used by gatling | |
val systemProps = new SystemProperties | |
javaOptions in Runtime ++= Seq( | |
mirrorProperty("javax.net.ssl.trustStore", "gatling.http.ssl.trustStore.file"), | |
mirrorProperty("javax.net.ssl.trustStorePassword", "gatling.http.ssl.trustStore.password"), | |
mirrorProperty("javax.net.ssl.keyStore", "gatling.http.ssl.keyStore.file"), | |
mirrorProperty("javax.net.ssl.keyStoreType", "gatling.http.ssl.keyStore.type"), | |
mirrorProperty("javax.net.ssl.keyStorePassword", "gatling.http.ssl.keyStore.password") | |
).flatten | |
def mirrorProperty(src: String, dest: String): Option[String] = { | |
val formatProperty = (key: String) => (value: String) => s"-D$key=$value" | |
systemProps.get(src).map(formatProperty(dest)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment