This repository has been archived by the owner on Jan 17, 2025. It is now read-only.
examples,tests: add new test_against_images_ref.py
test
#188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new test that uses the
images
library to generate reference manifests and then compares the output of an otk run against the reference image. This allows us to refactor theotk
images and always be confident that the result matches what "images" produces.It also converts all the examples to be just "verbatim" versions of the images library result so that it can be a useful starting point to refactor them.
Note that currently the reference manifests are part of the repository for convenience. It would be nicer to generate them on the fly but that is hard(er), see the comments in the code.
Note also that we most likely will have to do something about the "{boot,root}_fs_uuid" in the reference images as they will not match with the ones generated by
otk-gen-partition-table
as the calls intorand
are in a different order yielding predictable but different result between the two. We can cross this bridge when we reach it though and it's fairly simple (or exclude at the diff level).When we add the
dnfjson
external we will need to teach it to generate fake urls/shas just likegen-manifests
so that we can compare the results of a real run.The next steps should be to extract the common pieces into a nice structure (i.e. build #169 on top of this one) and integrate the externals (i.e. start with partition, c.f. #186)
[clean split out from https://github.com//pull/186]