buildah/tests/digest
Ed Santiago 91c08ff7fc image with dup layers: we now have one on quay
...and a process to create future ones. Thanks to Nalin for
a short patch to skopeo that allows pushing images with dups.

This commit updates make-v2sN to add "with-dups" functionality;
it simply creates a v2s1 image, then uses jq (JSON tool) to
duplicate the first .fsLayers and .history elements. Updated
instructions so others can (we hope) do this in the future
should it ever be necessary (we hope not).

Update the checks that confirm that the image we pull has
dup layers - this is a guarantee that we're testing what
we think we're testing.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-03-25 15:21:29 -06:00
..
README.md digest test : make more robust 2020-03-25 13:45:21 -06:00
make-v2s1 digest test : make more robust 2020-03-25 13:45:21 -06:00
make-v2s1-with-dups digest test : make more robust 2020-03-25 13:45:21 -06:00
make-v2s2 digest test : make more robust 2020-03-25 13:45:21 -06:00
make-v2sN image with dup layers: we now have one on quay 2020-03-25 15:21:29 -06:00

README.md

This subdirectory contains a script used to create images for testing.

To rephrase: this script is used before testing, not used in testing. Much before testing (days/weeks/months/years), and manually.

The script is make-v2sN but it is never invoked as such. Instead, various different symlinks point to the script, and the script figures out its use by picking apart the name under which it is called.

As of the initial commit on 2020-02-10 there are three symlinks:

  • make-v2s1 - Create a schema 1 image
  • make-v2s2 - Create a schema 2 image
  • make-v2s1-with-dups - Create a schema 1 image with two identical layers

If the script is successful, it will emit instructions on how to push the images to quay and what else you might need to do.

Updating

Should you need new image types, e.g. schema version 3 or an image with purple elephant GIFs in it:

  1. Decide on a name. Create a new symlink pointing to make-v2sN
  2. Add the relevant code to make-v2sN: a conditional check at the top, the actual image-creating code, and if possible a new test to make sure the generated image is good
  3. Run the script. Verify that the generated image is what you expect.
  4. Add new test(s) to digest.bats