Commit Graph

17 Commits

Author SHA1 Message Date
Miloslav Trmač
f423f01d1b Update an expected error message
https://github.com/containers/image/pull/2595 will change it.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-11-20 16:18:20 +01:00
Lokesh Mandvekar
d38276137e
Replace egrep with grep -E
This should silence any `egrep is obsolescent; using grep -E` warnings.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-08-16 09:13:18 -04:00
Miloslav Trmač
513a4f1ab3 Update for changed c/image error texts
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-05-14 00:27:18 +02:00
Michael Vogt
16b6f0ade5 main: return exit code 2 when an input is not found
This commit makes skopeo return a different exit code when an
input is not found. The use case is `osbuild` which uses skopeo
to inspect images and it would be nice to differenciate between
an image that is not found and general skopeo errors (or errors
like network issues etc).

I picked exit code `2` for `not found` because it is also the value
of `ENOENT`.

Man page and a test are added.

Signed-off-by: Michael Vogt <mvogt@redhat.com>
2024-03-25 18:05:45 +01:00
Chris Evich
292962d34c
Fix unnecessary use of podman in CI test
For whatever reasons, the podman configuration in CI results in the
inspect test throwing the following error:

```
not ok 4 inspect: image manifest list w/ diff platform
125
configuration is unset - using hardcoded default graph root
\"/var/lib/containers/storage\""
configuration is unset - using hardcoded default graph root
\"/var/lib/containers/storage\""
StoreOptions
```

Fix this by not using `podman`. It's unnecessary, since all the test
needs is the golang-flavor of the current system's architecture name.
That can easily be obtained by asking the go tool directly.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-01-18 10:09:44 -05:00
Miloslav Trmač
370be7e777 Improve a comment in the 010-inspect.bats test
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-02-22 19:44:14 +01:00
Miloslav Trmač
49d9fa9faf Only look for the layer digests in the Layers field.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-02-15 16:08:35 +01:00
Miloslav Trmač
77363128e1 Don't expect the config blob to be listed in (skopeo inspect)
... because it currently isn't.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-02-15 16:08:35 +01:00
Jaikiran Pai
2144a37c21 issue#785 inspect command - introduce a way to skip querying available tags for an image 2021-10-12 20:24:39 +05:30
Daniel J Walsh
6d6c8b5609 Update tests for removal of error and Error from error messages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-07-01 21:02:13 +02:00
Ed Santiago
47a6716921 Migrate tests from docker.io
Switch to using images from quay.io/libpod instead, where
we're not (yet) subject to rate limiting.

Completely rewrite one unclear test. The purpose of the
test was to test #708, in which 'skopeo inspect --raw'
was fixed to be able to inspect images that do not
match the current host's os+arch. We now use a fixed
test image on quay.io, generated by a new script,
whose manifest is pretty unlikely to match our host.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-01-21 14:04:01 -07:00
Ed Santiago
cf4dff471c Fix for yet another breaking podman change
'podman info' changed format, again, without preserving backward
compatibility. Basically, some keys that used to be lower-case
are now upper-case-first-letter.

These tests need to work with new podman on rawhide, and
old podman on f31/f32 and possibly RHEL. We must therefore
add a revolting workaround for the change.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-04-08 15:32:44 -06:00
Ed Santiago
1e7fe55be0 Use fully-qualified image names
Replace shortnames with FQINs; this should allow tests to
run regardless of the state of registries.conf.

And, fix one broken new test that invoked 'jq' (without dot).
This usage works in Fedora, but not in RHEL.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-03-19 14:13:18 -06:00
Alex Jia
2553a230d0 systemtest: inspect container image different from current platform arch
When --raw is provided, can inspect show the raw manifest list, w/o
requiring any particular platform to be present, this test case is
used for make sure inspect command w/ --raw option works well for
container image is different from current platform arch.

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2019-10-24 14:33:45 +08:00
Valentin Rothberg
1c243a5b12 systemtest/010-inspect.bats: require only PATH
The "inspect: env" test started failing since the environment in the
`fedora:latest` image has changed.  Hence, only check for `PATH` in
the image's environment which is a defacto standard.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-30 15:31:14 +02:00
Alex Jia
8d1bb15075 systemtest: add simple env test in inspect.bats
Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2019-09-18 10:35:27 +08:00
Ed Santiago
12f0e24519 systemtest - new set of BATS tests for RHEL8 gating
Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-05-28 10:10:50 -06:00