File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ # -*- sh -*-
2
+ #
3
+ # Tests for build-related endpoints
4
+ #
5
+
6
+ # test if default compat build contains labels from base image
7
+ TMPD=$( mktemp -d podman-apiv2-test.build.XXXXXXXX)
8
+ function cleanBuildTest() {
9
+ podman rmi -a -f
10
+ rm -rf " ${TMPD} " & > /dev/null
11
+ }
12
+ CONTAINERFILE_TAR=" ${TMPD} /containerfile.tar"
13
+ cat > $TMPD /containerfile << EOF
14
+ FROM $IMAGE
15
+ RUN echo hello
16
+ EOF
17
+ tar --format=posix -C $TMPD -cvf ${CONTAINERFILE_TAR} containerfile & > /dev/null
18
+
19
+ t POST " /build?dockerfile=containerfile&t=labeltest" $CONTAINERFILE_TAR 200 \
20
+ ' .aux|select(has("ID")).ID~^sha256:[0-9a-f]\{64\}$'
21
+
22
+ t GET images/labeltest/json 200 \
23
+ .Config.Labels.created_by=" test/system/build-testimage"
24
+ cleanBuildTest
25
+
26
+ # vim: filetype=sh
You can’t perform that action at this time.
0 commit comments