toolbox/test/system/libs
Debarshi Ray cac6b25f19 test/system: Tighten the regular expression used to detect the image ID
An OCI image's identifier (or ID) is a SHA-256 hash [1] whose length is
64 hexadecimal digits.  The ID can be abbreviated to a smaller number of
digits but the minimum is 6.  The regular expression being used to parse
the image ID wasn't checking the number of digits, and would even accept
an empty string as a valid ID, which was clearly wrong.

The format of a image reference is defined in:
https://github.com/moby/moby/blob/master/image/spec/v1.1.md
https://github.com/distribution/distribution/blob/main/reference/reference.go
https://github.com/distribution/distribution/blob/main/reference/regexp.go

Fallout from c6c2e426e0

[1] https://en.wikipedia.org/wiki/SHA-2

https://github.com/containers/toolbox/pull/1209
2023-01-12 14:44:05 +01:00
..
bats-assert@d750c5a1b4 test/system: Track bats libs as submodules & install them better 2021-07-22 10:23:53 +02:00
bats-support@24a72e1434 test/system: Track bats libs as submodules & install them better 2021-07-22 10:23:53 +02:00
helpers.bash test/system: Tighten the regular expression used to detect the image ID 2023-01-12 14:44:05 +01:00