Skip to content

Commit

Permalink
Fix missing PORTABLE type in base mock
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Jan 31, 2025
1 parent f9b82ae commit 8c62cca
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ abstract class SystemCleanerFilterTest : BaseTest() {
userHandle = UserHandle2(-1)
)

val portable = DataArea(
flags = emptySet(),
type = Type.PORTABLE,
path = LocalPath.build("storage", "usb1"),
userHandle = UserHandle2(1),
)

private val dataAreas = setOf(
storageData1,
storageData2,
Expand Down Expand Up @@ -243,6 +250,7 @@ abstract class SystemCleanerFilterTest : BaseTest() {
storageAndroidMedia1,
storageAndroidMedia2,
storageCachePartition,
portable,
)

private data class TreeKey(
Expand Down Expand Up @@ -315,6 +323,14 @@ abstract class SystemCleanerFilterTest : BaseTest() {
neg(Type.SDCARD, "Pictures", Flag.Dir)
neg(Type.SDCARD, "Camera", Flag.Dir)
neg(Type.SDCARD, "Music", Flag.Dir)

neg(Type.PORTABLE, "DCIM", Flag.Dir)
neg(Type.PORTABLE, "DCIM/Camera", Flag.Dir)
neg(Type.PORTABLE, "Android", Flag.Dir)
neg(Type.PORTABLE, "Photos", Flag.Dir)
neg(Type.PORTABLE, "Pictures", Flag.Dir)
neg(Type.PORTABLE, "Camera", Flag.Dir)
neg(Type.PORTABLE, "Music", Flag.Dir)
}

suspend fun confirm(filter: SystemCleanerFilter) {
Expand Down

0 comments on commit 8c62cca

Please sign in to comment.