Add a test helper for examining image metadata and checking their types,
and add tests that use it to verify that after writing either Docker v2
or OCI v1 images, that the manifest and configuration blobs that we
stored for them successfully decode as the correct data types.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #118
Approved by: rhatdan
When saving the contents of a URL to a local file, attempt to set mtime
based on the response's Last-Modified header, if there is one.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #58
Approved by: nalind
Clean up the tests so that data files that we generate don't get dropped
in the root directory of the host, or in a part of ${TMPDIR} that we
won't clean up. Add tests to exercise "add"'s extracting logic.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>