mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
fix(lab): reuse installed add-on packs so the Agent can restart (#2512)
This commit is contained in:
1 parent
1882520cac
commit
b303423001
3 files changed
+24
-1
No files matched your search
@@ -58,6 +58,22 @@ class AddonPackTest {
|
||||
assertFalse(AddonPack("sample", "", 0L, listOf("tool"), reuseDeviceCopy = false).installed(context))
|
||||
}
|
||||
|
||||
@Test fun labBuildReusesInstalledPackDespiteDifferentSourcePin() {
|
||||
installed("b".repeat(64))
|
||||
val pack = AddonPack("sample", "a".repeat(64), 1L, listOf("tool"), labBuild = true)
|
||||
|
||||
assertTrue(pack.installed(context))
|
||||
assertEquals("b".repeat(64), pack.dir(context).name)
|
||||
}
|
||||
|
||||
@Test fun labBuildWithoutCompleteInstalledPackKeepsSourcePin() {
|
||||
installed("b".repeat(64), complete = false)
|
||||
val pack = AddonPack("sample", "a".repeat(64), 1L, listOf("tool"), labBuild = true)
|
||||
|
||||
assertFalse(pack.installed(context))
|
||||
assertEquals("a".repeat(64), pack.dir(context).name)
|
||||
}
|
||||
|
||||
@Test fun localBuildInstallsTheBundledPackWithoutDownloading() {
|
||||
val archive = tarZst("tool" to "x")
|
||||
val pack = AddonPack("sample", Hashes.sha256(archive), archive.length(), listOf("tool"), bundle = { archive.inputStream() })
|
||||
|
||||
Reference in new issue
Block a user