summaryrefslogtreecommitdiff
path: root/tests/test_recursiveloader.py
AgeCommit message (Collapse)Author
2024-06-17Relicense as GPL-2.0-or-laterMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2023-05-29tests: Make StrayCompressedManifestLayout allow any gzip outputMichał Górny
Update StrayCompressedManifestLayout test not to rely on specific gzip output. It changes in Python 3.12, and it was a bad idea anyway. Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-09-26Modernize via pyupgradeMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-09-17Include full path in ManifestNoSupportedHashes exceptionMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-09-17Support --require-secure-hashes in verifyMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-09-17Do not verify Manifests when calling update_entry_for_path()Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-09-17Fix update w/ require_secure_hashes to require at least one hashMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-09-17Support controlling secure hashes req in CLI updateMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-09-16Support requiring secure hashes in ManifestRecursiveLoaderMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-09-13Fix linter failureMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2022-09-13Handle unknown hashes gracefully when verifyingMichał Górny
Closes: https://github.com/projg2/gemato/issues/19 Signed-off-by: Michał Górny <mgorny@gentoo.org>
2020-09-08test_recursiveloader: Attempt to fix misordered Manifest testsMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2020-09-05test_recursiveloader: Cache tmp_paths for read-only layoutsMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2020-09-05Handle invalid compressed files when collecting ManifestsMichał Górny
Fix load_unregistered_manifests() not to crash on 'Manifest*' files that do not contain valid compressed data. Instead, treat them as unknown files, similarly how Manifests with invalid data are handled. Signed-off-by: Michał Górny <mgorny@gentoo.org>
2020-09-05Fix wrongly determining uncompressed sizeMichał Górny
Flush the file after writing to ensure that .buffer.tell() gives non-zero value. This fixes a number of cases of Manifests not being compressed. It also pointed out a major mistake in profile tests. Signed-off-by: Michał Górny <mgorny@gentoo.org>
2020-09-05tests: Port test_recursiveloader to pytestMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2018-02-22cli: Add -x option to prevent crossing filesystem boundariesMichał Górny
2018-02-22tests: Assert for /proc being a mountpoint for cross-fs testsMichał Górny
Skip cross-fs tests if /proc is not a mountpoint. This handles cases when /proc exists but is not mounted which is quite normal e.g. on Gentoo/FreeBSD.
2018-02-08recursiveloader: Allow cross-device processing by defaultMichał Górny
2018-02-02recursiveloader: Detect symlink loops explicitlyMichał Górny
2018-02-02recursiveloader: Check for cross-device directories earlier in loopMichał Górny
Check for cross-device directory when starting to process the directory rather than for each subdirectory to be processed. This will avoid double stat() call in the future. It also means that cross-device exceptions are raised a little later, when recurring into the directory rather than before doing that. However, the starting directory is now also tested.
2017-12-12Add tests for dealing with symlink loopsMichał Górny
2017-12-02tests: Replace lambdas with serializable functionsMichał Górny
2017-12-02Add tests for entries for files in missing directoryMichał Górny
2017-12-02recursiveloader: Split get_file_entry_dict() per directoryMichał Górny
2017-12-02recursiveloader: Ignore Manifest mismatches when updatingMichał Górny
2017-12-02tests: Add tests for mismatched Manifest fileMichał Górny
2017-11-22test_recursiveloader: Add tests for filenames needing escapingMichał Górny
2017-11-14find_top_level: Disallow compressed top-level Manifest by defaultMichał Górny
2017-11-14profile: Do not compress top-level Manifest by defaultMichał Górny
Top-level Manifest compression is now forbidden by the specification for security reasons. Therefore, modify the algorithm in the default profile to prevent that. A compressed top-level Manifest can still be created explicitly via the API, or using a custom profile.
2017-11-08Remove non-strict verification modeMichał Górny
2017-11-08Remove support for OPTIONAL entriesMichał Górny
2017-11-02cli: Support writing timestamp to ManifestMichał Górny
2017-11-02recursiveloader: Support setting timestampMichał Górny
2017-11-02recursiveloader: Support restricting directory updates to mtimeMichał Górny
2017-11-02recursiveloader: Support specifying mtime for verificationMichał Górny
2017-11-02recursiveloader: Fix updating deeply nested compressed ManifestsMichał Górny
2017-11-01recursiveloader: Support creating sub-ManifestMichał Górny
2017-10-31recursiveloader: Optimize collecting existing ManifestsMichał Górny
2017-10-31recursiveloader: Make it possible to filter get_file_entry_dict()Michał Górny
2017-10-31recursiveloader: Fix adding sub-Manifests to higher level ManifestMichał Górny
2017-10-31recursiveloader: Optimize selecting Manifest for new entriesMichał Górny
2017-10-30cli: Do not require full file path for 'create' actionMichał Górny
2017-10-29recursiveloader: Fix telling filesize of compressed filesMichał Górny
2017-10-29cli: Add compression and forcing optionsMichał Górny
2017-10-29recursiveloader: Support compressing Manifests on watermark valueMichał Górny
2017-10-29testutil: Simplify tests to use shutil.rmtree() for tempdirMichał Górny
2017-10-29recursiveloader: Support sorting Manifest entriesMichał Górny
2017-10-29recursiveloader: Support forcing Manifest updateMichał Górny
2017-10-29cli: Support create actionMichał Górny