seedvault-app / seedvault

A backup application for the Android Open Source Project.
1.26k stars 74 forks source link

Have some integration tests for K/V backups with room #548

Open theimpulson opened 1 year ago

theimpulson commented 1 year ago

Thanks for removing. I thought about it and actually there's probably no point in removing it. We build this app with AOSP, so whatever is in AOSP gets used. Removing this here just affects our gradle builds which are dev only.

So, the testing would actually need to happen when AOSP bumps its deps. Ideally, we'd also have some integration tests for K/V backups with room. E.g. Some sample data in the repo and we try to read and compare the result with what we expect. Then just running these tests (on-device!) would already give us more peace of mine.

_Originally posted by @grote in https://github.com/seedvault-app/seedvault/pull/526#discussion_r1282858166_

grote commented 1 year ago

@stevesoltys for this, we'd need test data that has a K/V backup and when restoring it, we'd need to compare the data with what the expect. But I guess we could also use app test data and do a backup of that first.

stevesoltys commented 1 year ago

Any ideas for apps which produce K/V backups that can be included in the static test data?

grote commented 12 months ago

The most important one is this magic package manager sentinel where it stores the app metadata. If we would assert the existence of some of those keys and the hash of some values this would be fine I'd say.

However, for this ticket, ideally, we'd test an AOSP build on a new AOSP emulator image to be sure nothing breaks, but one step after the next.