mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-01-30 09:41:33 -05:00
[db] Assert that DB transaction gets rolled back when index update fails
This commit is contained in:
committed by
Michael Pöhn
parent
f9f81dc894
commit
6b4e91ca0b
@@ -130,6 +130,11 @@ internal class IndexV1UpdaterTest : DbTest() {
|
||||
val result = indexUpdater.updateNewRepo(repo, "not the right fingerprint")
|
||||
assertIs<IndexUpdateResult.Error>(result)
|
||||
assertIs<SigningException>(result.e)
|
||||
|
||||
// check that the DB transaction was rolled back and the DB wasn't changed
|
||||
assertEquals(repo, repoDao.getRepository(repoId) ?: fail())
|
||||
assertEquals(0, appDao.countApps())
|
||||
assertEquals(0, versionDao.countAppVersions())
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user