Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests: switch some base images #5499

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/bud.bats
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ _EOF
}

@test "bud build with heredoc content" {
_prefetch fedora
_prefetch quay.io/fedora/python-311
run_buildah build -t heredoc $WITH_POLICY_JSON -f $BUDFILES/heredoc/Containerfile .
expect_output --substring "print first line from heredoc"
expect_output --substring "print second line from heredoc"
Expand Down Expand Up @@ -4486,17 +4486,17 @@ EOM
}

@test "bud arg and env var with same name" {
_prefetch centos:8
_prefetch busybox
# Regression test for https://github.com/containers/buildah/issues/2345
run_buildah build $WITH_POLICY_JSON -t testctr $BUDFILES/dupe-arg-env-name
expect_output --substring "https://example.org/bar"
}

@test "bud copy chown with newuser" {
_prefetch ubuntu:latest
_prefetch quay.io/fedora/fedora
# Regression test for https://github.com/containers/buildah/issues/2192
run_buildah build $WITH_POLICY_JSON -t testctr -f $BUDFILES/copy-chown/Containerfile.chown_user $BUDFILES/copy-chown
expect_output --substring "myuser myuser"
expect_output --substring "myuser:myuser"
}

@test "bud-builder-identity" {
Expand Down
3 changes: 2 additions & 1 deletion tests/bud/build-with-from/Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM fedora as builder
# "fedora" is replaced as the base image at test-time using the --from flag
FROM fedora as builder
FROM busybox
COPY --from=builder /bin/df /tmp/df_tester

5 changes: 2 additions & 3 deletions tests/bud/copy-chown/Containerfile.chown_user
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM ubuntu:latest
FROM quay.io/fedora/fedora

ENV MYUSER=myuser

RUN useradd --create-home --home /"${MYUSER}" "${MYUSER}"
COPY --chown="${MYUSER}" ./copychown.txt /somewhere

RUN ls -alF /somewhere
RUN stat -c "%U:%G" /somewhere
2 changes: 1 addition & 1 deletion tests/bud/dupe-arg-env-name/Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos:8
FROM busybox
ARG FOO=bar
ARG WEBROOT=https://example.org/

Expand Down
5 changes: 4 additions & 1 deletion tests/bud/heredoc/Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM fedora
FROM quay.io/fedora/python-311

USER root
WORKDIR /

RUN <<EOF
echo "print first line from heredoc"
Expand Down