Skip to content
Snippets Groups Projects
user avatar
Matthias Urhahn authored
* Rework of keyfile download and caching.
* Supports interop
* More modular for better testing and build flavour based behavior adjustments
* More resilient handling of failed downloads
* Preperations for future hourly download and serverside checksums

TODO: Finish unit tests, keycache migration and cache health check

* First batch of unit tests and some fixes for incorrect behavior that the tests surfaced.

* Added unit tests for the KeyCacheRepository

TODO: Tests for downloader and migration.

* Implemented POC for migration old key files.

* Fixed legacy file migration and cleanup, improved logging.

* Added unit tests for legacy key file migration.

* Add fallback for different file hashes in the header.

* Yes kLint, we know it's a long method,
but for this it's better to read it in one block vs jumping to extra methods.

* More linting issues, adjusting project code style prevent a few of these in the future.

* Added missing unit tests for `KeyFileDownloader` and fixed faulty behavior that was noticed during testing.

* CRUD (instrumentation) test for `KeyCacheDatabase`

* Remove unused `FileStorageHelper` and related constants+tests.

* Fix last3Hours unit test in deviceRelease mode, we need to explicitly enable debug for these tests.

* Until we have more information about the hashsum's format in the header, default to `ETag

* Split app config server API from diagnosis key download API,
and reintroduce caching for the app config download.

* Add test to check that the cache is used on flaky connections.

* Code changes based on PR comment, part #1.

* Code fluff, formatting.

* Handle download errors correctly.

* Refactoring:
* Remove unnecessary `currentDate` we always start with the newest date from the servers index.
* Make a specialised class for header validation

* Let legacy cache migration abort early, depending on whether the key dir exists.

* If we can't create the base directory for the key repo, throw an exception.

* Delete cache entry if a download fails.

* Fixed test regression due to refactoring.

* Consolidate staleness check into `getStale`

* Consolidate clean up for failed downloads into the download method.
Added tests to check that we delete the keycache entry if the download fails (which we didn't for hours :O!)

* Because the hour-mode uses caching too, we add an explicit button to the test menu that clears the cache.

* Add comment with reference to ticket regarding follow up on the other headers.

* Move expected storage size per country into a named constant.

Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
f7f185a3
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.