FlowCrypt / flowcrypt-android

FlowCrypt Android App
https://flowcrypt.com
Other
90 stars 11 forks source link

Try WireMock as a mock web server #1771

Open DenBond7 opened 2 years ago

DenBond7 commented 2 years ago

WireMockRule https://github.com/wiremock/wiremock/blob/master/src/test/java/com/github/tomakehurst/wiremock/junit/WireMockRuleFailOnUnmatchedRequestsTest.java

https://github.com/wiremock/wiremock

DenBond7 commented 2 years ago
val wireMockRule = WireMockRule(
    options()
      .httpsPort(TestConstants.MOCK_WEB_SERVER_PORT)
      .httpDisabled(true)
      .keystorePath("ssl/localhost.keystore")
      .keystorePassword("android")
      .keyManagerPassword("android"), true
  )

localhost_keystore(rename to localhost.keystore).txt

androidTestImplementation("com.github.tomakehurst:wiremock-jre8:version")