Fix tests
This commit is contained in:
parent
eb5e03a79c
commit
797f8b9e61
1 changed files with 13 additions and 5 deletions
|
|
@ -14,6 +14,12 @@ import org.junit.Test
|
||||||
@LargeTest
|
@LargeTest
|
||||||
internal class BackupRestoreTest : SeedvaultLargeTest() {
|
internal class BackupRestoreTest : SeedvaultLargeTest() {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private val IGNORED_KV_DATA = mapOf(
|
||||||
|
"@pm@" to setOf("@meta@")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `backup and restore applications`() {
|
fun `backup and restore applications`() {
|
||||||
launchBackupActivity()
|
launchBackupActivity()
|
||||||
|
|
@ -132,6 +138,7 @@ internal class BackupRestoreTest : SeedvaultLargeTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
kvData.forEach { (key, value) ->
|
kvData.forEach { (key, value) ->
|
||||||
|
if(IGNORED_KV_DATA[pkg]?.contains(key) == false) {
|
||||||
assert(backup.kv[pkg]!!.containsKey(key)) {
|
assert(backup.kv[pkg]!!.containsKey(key)) {
|
||||||
"KV data for $pkg/$key exists in restore but is missing from backup."
|
"KV data for $pkg/$key exists in restore but is missing from backup."
|
||||||
}
|
}
|
||||||
|
|
@ -143,3 +150,4 @@ internal class BackupRestoreTest : SeedvaultLargeTest() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue