betamax で HTTPS URL が機能しません。
これは、以下に投稿されたこの他の問題と似ていますが、既に betamax.pem ファイルのインポートを行っており、効果がないようです。
私が実行したインポートコマンドは次のとおりです。
c:\Users\UserAccount>"%JAVA_HOME%/bin/keytool.exe" -importcert -keystore "%JAVA_HOME%/jre/lib/security/cacerts" -file betamax.pem -alias betamax -storepass changeit -noprompt
これが私の設定です:
static final File TAPES =
new File(System.getProperty('BETAMAX_TAPEDIR') ?:
'src/integrationTest/resources/betamax/tapes')
static final TapeMode TAPEMODE =
System.getProperty('BETAMAX_MAKETAPES') ?
TapeMode.READ_WRITE :
TapeMode.READ_ONLY
static final Integer PROXYPORT =
System.getProperty('BETAMAX_PROXYPORT') ?
System.getProperty('BETAMAX_PROXYPORT').toInteger() :
Configuration.DEFAULT_PROXY_PORT
@Shared
Configuration configuration = Configuration.builder()
.tapeRoot(TAPES)
.ignoreLocalhost(false)
.defaultMode(TAPEMODE)
.proxyPort(PROXYPORT)
.sslEnabled(true)
.build()
@Rule
RecorderRule recorder = new RecorderRule(configuration)
@Betamax(tape='GradleNews.tape')
def "Try record HTTPS"()
{
when:
def http = new RESTClient('https://discuss.gradle.org')
http.head path: 'c/books-articles'
then:
true
}
生成するもの:
javax.net.ssl.SSLException: hostname in certificate didn't match: <discuss.gradle.org> != <*.discourse.org> OR <*.discourse.org> OR <discourse.org>
誰かが私が間違っていることを見ることができますか?
同様の問題のレポートは次のとおりです 。Betamax は HTTPS トラフィックを記録できません