debian-forge/test
Christian Kellner ae0680da11 osbuid: integrate FsCache into ObjectStore
Integrate the recently added file system cache `FsCache` into our
object store `ObjectStore`. NB: This changes the semantics of it:
previously a call to `ObjectStore.commit` resulted in the object
being in the cache (i/o errors aside). But `FsCache.store`, which
is now the backing store for objects, will only commit objects if
there is enough space left. Thus we cannot rely that objects are
present for reading after a call to `FsCache.store`. To cope with
this we now always copy the object into the cache, even for cases
where we previously moved it: for the case where commit is called
with `object_id` matching `Object.id`, which is the case for when
`commit` is called for last stage in the pipeline. We could keep
this optimization but then we would have to special case it and
not call `commit` for these cases but only after we exported all
objects; or in other words, after we are sure we will never read
from any committed object again. The extra complexity seems not
worth it for the little gain of the optimization.
Convert all the tests for the new semantic and also remove a lot
of them that make no sense under this new paradigm.

Add a new command line option `--cache-max-size` which will set
the maximum size of the cache, if specified.
2022-12-09 12:03:40 +01:00
..
cases osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
data test/stages/users: ignore non-deterministic files 2022-12-08 14:44:39 +01:00
mod osbuid: integrate FsCache into ObjectStore 2022-12-09 12:03:40 +01:00
run mounts: use the options object for mountopts 2022-11-30 14:21:10 +01:00
src test/src: improve file enumeration 2022-09-23 12:08:10 +02:00
.gitignore introduce testing script 2019-07-09 10:29:48 +02:00
__init__.py osbuild: add description() methods 2019-08-07 10:01:17 +02:00
initrd.py test: explicit encodings for open() 2022-09-09 15:33:29 +02:00
test.py osbuid: integrate FsCache into ObjectStore 2022-12-09 12:03:40 +01:00