Skip to content

Commit 3e811de

Browse files
Merge pull request #15697 from nextcloud/fix/ci-tests
fix: tests
2 parents 18c7759 + 1ecf6fa commit 3e811de

File tree

8 files changed

+15
-27
lines changed

8 files changed

+15
-27
lines changed

app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ plugins {
3232
alias(libs.plugins.spotless)
3333
alias(libs.plugins.kapt)
3434
alias(libs.plugins.ksp) apply false
35+
alias(libs.plugins.kotlin.serialization)
3536
}
3637

3738
apply plugin: "com.android.application"
@@ -496,6 +497,9 @@ dependencies {
496497
// region Image loading
497498
implementation libs.coil
498499
// endregion
500+
501+
// kotlinx.serialization
502+
implementation(libs.kotlinx.serialization.json)
499503
}
500504

501505

app/src/androidTest/java/com/owncloud/android/AbstractIT.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,6 @@ public BatteryStatus getBattery() {
400400
public boolean isPowerSavingEnabled() {
401401
return false;
402402
}
403-
404-
@Override
405-
public boolean isPowerSavingExclusionAvailable() {
406-
return false;
407-
}
408403
};
409404

410405
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);

app/src/androidTest/java/com/owncloud/android/AbstractOnServerIT.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,6 @@ public BatteryStatus getBattery() {
216216
public boolean isPowerSavingEnabled() {
217217
return false;
218218
}
219-
220-
@Override
221-
public boolean isPowerSavingExclusionAvailable() {
222-
return false;
223-
}
224219
};
225220

226221
UserAccountManager accountManager = UserAccountManagerImpl.fromContext(targetContext);

app/src/androidTest/java/com/owncloud/android/UploadIT.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,6 @@ public Connectivity getConnectivity() {
8282
public boolean isPowerSavingEnabled() {
8383
return false;
8484
}
85-
86-
@Override
87-
public boolean isPowerSavingExclusionAvailable() {
88-
return false;
89-
}
90-
9185
@NonNull
9286
@Override
9387
public BatteryStatus getBattery() {
@@ -237,11 +231,6 @@ public boolean isPowerSavingEnabled() {
237231
return false;
238232
}
239233

240-
@Override
241-
public boolean isPowerSavingExclusionAvailable() {
242-
return false;
243-
}
244-
245234
@NonNull
246235
@Override
247236
public BatteryStatus getBattery() {

app/src/androidTest/java/com/owncloud/android/files/services/FileUploaderIT.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ abstract class FileUploaderIT : AbstractOnServerIT() {
4646
override val isPowerSavingEnabled: Boolean
4747
get() = false
4848

49-
override val isPowerSavingExclusionAvailable: Boolean
50-
get() = false
51-
5249
override val battery: BatteryStatus
5350
get() = BatteryStatus()
5451
}

app/src/test/java/com/nextcloud/client/device/TestPowerManagementService.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ class TestPowerManagementService {
8383
@Test
8484
fun `power saving check is disabled`() {
8585
// GIVEN
86-
// a device which falsely returns power save mode enabled
87-
// power check is overridden by user
88-
whenever(platformPowerManager.isPowerSaveMode).thenReturn(true)
86+
whenever(platformPowerManager.isPowerSaveMode).thenReturn(false)
8987

9088
// WHEN
9189
// power save mode is checked

gradle/libs.versions.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ spotless = "7.2.1"
7171
stateless4jVersion = "2.6.0"
7272
webkitVersion = "1.14.0"
7373
workRuntime = "2.10.4"
74+
kotlinxSerializationJson = "1.9.0"
7475

7576
kotlin = "2.2.20"
7677
ksp = "2.2.20-2.0.3"
@@ -102,6 +103,8 @@ coil = { module = "io.coil-kt:coil", version.ref = "coilVersion" }
102103
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayoutVersion" }
103104
emoji-google = { module = "com.vanniktech:emoji-google", version.ref = "emojiGoogleVersion" }
104105

106+
# kotlinx
107+
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
105108

106109
# Other
107110
annotation = { module = "androidx.annotation:annotation", version.ref = "annotationVersion" }
@@ -219,3 +222,4 @@ kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "ko
219222
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
220223
kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
221224
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
225+
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

gradle/verification-metadata.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29047,6 +29047,12 @@
2904729047
</sha256>
2904829048
</artifact>
2904929049
</component>
29050+
<component group="org.jetbrains.kotlin.plugin.serialization" name="org.jetbrains.kotlin.plugin.serialization.gradle.plugin" version="2.2.20">
29051+
<artifact name="org.jetbrains.kotlin.plugin.serialization.gradle.plugin-2.2.20.pom">
29052+
<sha256 value="48a64185623040fd6677b010083d89c618139bd73160badad65916e6d5439fc6" origin="Generated by Gradle" reason="Artifact is not signed"/>
29053+
<sha256 value="80aa32a61137d505c44bb1e135d9289593a6f944cec8083ab595c071debac5d8" origin="Generated by Gradle" reason="Artifact is not signed"/>
29054+
</artifact>
29055+
</component>
2905029056
<component group="org.jetbrains.kotlinx" name="atomicfu" version="0.16.1">
2905129057
<artifact name="atomicfu-0.16.1.module">
2905229058
<sha256 value="fdcf04fc25f6a43f557f341ee0053caa25e759f591169c86566f1dad37fc77a6" origin="Generated by Gradle"/>

0 commit comments

Comments
 (0)