Skip to content

Commit

Permalink
use alpine, not centos, for various tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ed Santiago <[email protected]>
  • Loading branch information
edsantiago committed Feb 6, 2020
1 parent 0f5fd98 commit 63e500b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
7 changes: 4 additions & 3 deletions tests/bud.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ load helpers
}

@test "bud with FROM AS construct" {
_prefetch centos:7
_prefetch alpine
run_buildah bud --signature-policy ${TESTSDIR}/policy.json -t test1 ${TESTSDIR}/bud/from-as
run_buildah images -a
expect_output --substring "test1"
Expand All @@ -1185,7 +1185,7 @@ load helpers
}

@test "bud with FROM AS construct with layers" {
_prefetch centos:7
_prefetch alpine
run_buildah bud --layers --signature-policy ${TESTSDIR}/policy.json -t test1 ${TESTSDIR}/bud/from-as
run_buildah images -a
expect_output --substring "test1"
Expand All @@ -1200,6 +1200,7 @@ load helpers
}

@test "bud with FROM AS skip FROM construct" {
_prefetch alpine
run_buildah bud --signature-policy ${TESTSDIR}/policy.json -t test1 -f ${TESTSDIR}/bud/from-as/Dockerfile.skip ${TESTSDIR}/bud/from-as
expect_output --substring "LOCAL=/1"
expect_output --substring "LOCAL2=/2"
Expand Down Expand Up @@ -1750,7 +1751,7 @@ load helpers
}

@test "bud containerfile with args" {
_prefetch centos
_prefetch alpine
target=use-args
touch ${TESTSDIR}/bud/use-args/abc.txt
run_buildah bud --signature-policy ${TESTSDIR}/policy.json -t ${target} --build-arg=abc.txt ${TESTSDIR}/bud/use-args
Expand Down
4 changes: 2 additions & 2 deletions tests/bud/from-as/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM centos:7 AS base
FROM alpine AS base
RUN touch /1
ENV LOCAL=/1
RUN find $LOCAL

FROM base
RUN find $LOCAL
6 changes: 3 additions & 3 deletions tests/bud/from-as/Dockerfile.skip
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM registry.centos.org/centos/centos:centos7 AS base
FROM alpine AS base
RUN touch /1
ENV LOCAL=/1
RUN find $LOCAL

FROM base
RUN find $LOCAL
RUN touch /2
Expand All @@ -11,4 +11,4 @@ RUN find $LOCAL2

FROM base
RUN find $LOCAL
RUN ls /
RUN ls /
2 changes: 1 addition & 1 deletion tests/bud/use-args/Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos
FROM alpine
ARG testArg
RUN echo ${testArg}
COPY ${testArg} .
2 changes: 1 addition & 1 deletion tests/bud/use-args/Containerfile.dest_nobrace
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos
FROM alpine
ARG testArg
ARG destination
RUN echo $testArg
Expand Down
2 changes: 1 addition & 1 deletion tests/bud/use-args/Containerfile.destination
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos
FROM alpine
ARG testArg
ARG destination
RUN echo ${testArg}
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ function _prefetch() {
)
)
rm -f $_BUILDAH_IMAGE_CACHEDIR/$fname.tar
echo "# [podman save $img >$_BUILDAH_IMAGE_CACHEDIR/$fname.tar ]" >&2
podman $_podman_opts save --output=${_BUILDAH_IMAGE_CACHEDIR}/$fname.tar $img
echo "# [podman save --format oci-archive $img >$_BUILDAH_IMAGE_CACHEDIR/$fname.tar ]" >&2
podman $_podman_opts save --format oci-archive --output=${_BUILDAH_IMAGE_CACHEDIR}/$fname.tar $img
fi
done
}
Expand Down

0 comments on commit 63e500b

Please sign in to comment.