summaryrefslogtreecommitdiff
path: root/test/apiv2/10-images.at
blob: 243b35e9f6cc35b6c76fcd8ee0cb6eff222a8047 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- sh -*-
#
# Tests for image-related endpoints
#

# FIXME: API doesn't support pull yet, so use podman
podman pull -q $IMAGE

# We want the SHA without the "sha256:" prefix
full_iid=$(podman images --no-trunc --format '{{.ID}}' $IMAGE)
iid=${full_iid##sha256:}

t GET libpod/images/$iid/exists                     204
t GET libpod/images/$PODMAN_TEST_IMAGE_NAME/exists  204

# FIXME: compare to actual podman info
t GET libpod/images/json 200  \
  .[0].Id=${iid}

t GET libpod/images/$iid/json 200 \
  .Id=$iid \
  .RepoTags[0]=$IMAGE

# Same thing, but with abbreviated image id
t GET libpod/images/${iid:0:12}/json 200 \
  .Id=$iid \
  .RepoTags[0]=$IMAGE

# FIXME: docker API incompatibility: libpod returns 'id', docker 'sha256:id'
t GET images/$iid/json 200 \
  .Id=sha256:$iid \
  .RepoTags[0]=$IMAGE

#t POST images/create fromImage=alpine 201 foo

# vim: filetype=sh