Fix MasterkeyCryptoCloudProviderTest and enhance logging when test fails

This commit is contained in:
Julian Raufelder 2021-04-12 16:00:22 +02:00
parent 4871172fb4
commit ae4c57ac8e
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D
4 changed files with 52 additions and 10 deletions

View File

@ -17,6 +17,8 @@ android {
buildConfigField 'int', 'VERSION_CODE', "${globalConfiguration["androidVersionCode"]}"
buildConfigField "String", "VERSION_NAME", "\"${globalConfiguration["androidVersionName"]}\""
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
compileOptions {
@ -98,6 +100,11 @@ dependencies {
// dagger
annotationProcessor dependencies.daggerCompiler
implementation dependencies.dagger
api dependencies.jsonWebTokenApi
implementation dependencies.jsonWebTokenImpl
implementation dependencies.jsonWebTokenJson
// cloud
implementation dependencies.dropbox
implementation dependencies.msgraph
@ -150,6 +157,7 @@ dependencies {
testRuntimeOnly dependencies.junit4Engine
testImplementation dependencies.mockito
testImplementation dependencies.mockitoInline
testImplementation dependencies.hamcrest
}
@ -160,3 +168,16 @@ configurations {
static def getApiKey(key) {
return System.getenv().getOrDefault(key, "")
}
tasks.withType(Test) {
testLogging {
events "failed"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
showStandardStreams = false
}
}

View File

@ -16,6 +16,8 @@ android {
buildConfigField 'int', 'VERSION_CODE', "${globalConfiguration["androidVersionCode"]}"
buildConfigField "String", "VERSION_NAME", "\"${globalConfiguration["androidVersionName"]}\""
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
compileOptions {
@ -50,10 +52,8 @@ dependencies {
implementation dependencies.appcompat
api dependencies.jsonWebTokenApi
runtimeOnly dependencies.jsonWebTokenImpl
runtimeOnly(dependencies.jsonWebTokenJson) {
exclude group: 'org.json', module: 'json' //provided by Android natively
}
implementation dependencies.jsonWebTokenImpl
implementation dependencies.jsonWebTokenJson
// test
testImplementation dependencies.junit
@ -65,6 +65,7 @@ dependencies {
testRuntimeOnly dependencies.junit4Engine
testImplementation dependencies.mockito
testImplementation dependencies.mockitoInline
testImplementation dependencies.hamcrest
}

View File

@ -169,12 +169,6 @@ dependencies {
implementation dependencies.zxcvbn
implementation dependencies.rxBinding
api dependencies.jsonWebTokenApi
runtimeOnly dependencies.jsonWebTokenImpl
runtimeOnly(dependencies.jsonWebTokenJson) {
exclude group: 'org.json', module: 'json' //provided by Android natively
}
// multidex
implementation dependencies.multidex
@ -237,3 +231,16 @@ androidExtensions {
static def getApiKey(key) {
return System.getenv().getOrDefault(key, "")
}
tasks.withType(Test) {
testLogging {
events "failed"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
showStandardStreams = false
}
}

View File

@ -73,3 +73,16 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
tasks.withType(Test) {
testLogging {
events "failed"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
showStandardStreams = false
}
}