Skip to content

Commit

Permalink
tests: update Dockerfiles
Browse files Browse the repository at this point in the history
This commit brings 10 years of Ubuntu updates to the tests, and small
syntax updates for docker not to complain.

Two tests were updated to reflect the changes in the strings generated
by GNU Make in test files.
  • Loading branch information
florentsfl committed Dec 4, 2024
1 parent 8142616 commit 1bf553b
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/05-cqfd_init_custom_image
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EOF

# Test dockerfile
mkdir -p .cqfd/docker
echo "FROM ubuntu:20.04" > .cqfd/docker/Dockerfile
echo "FROM ubuntu:24.04" > .cqfd/docker/Dockerfile

jtest_prepare "docker registry contains NO image named: $custom_image_1"
if docker inspect "$custom_image_1" &>/dev/null; then
Expand Down
2 changes: 1 addition & 1 deletion tests/05-cqfd_run_c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test_step1() {
$cqfd run -c --debug >> $test_run_c_file

# at the end of this test, $test_run_c_file is populated
if ! grep -qw "target \`build'" $test_run_c_file; then
if ! grep -qw "target 'build'" $test_run_c_file; then
jtest_log fatal "$test_run_c_file not present after test"
jtest_result fail
rm -f $test_run_c_file
Expand Down
2 changes: 1 addition & 1 deletion tests/05-cqfd_run_c_flavor
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jtest_prepare "build cmd for '$flavor' flavor and concatenate with an additional
$cqfd -b $flavor run -c --debug >> $test_run_c_file

# at the end of this test, $test_run_c_file is populated
if ! grep -qw "target \`foo'" $test_run_c_file; then
if ! grep -qw "target 'foo'" $test_run_c_file; then
jtest_log fatal "$test_run_c_file not present after test"
jtest_result fail
rm -f $test_run_c_file
Expand Down
2 changes: 1 addition & 1 deletion tests/05-cqfd_run_su_or_sudo_backend
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $cqfd init && \
################################################################################
# Use another custom Dockerfile with a recent version of su.
################################################################################
echo "FROM ubuntu:20.04" > .cqfd/docker/Dockerfile
echo "FROM ubuntu:24.04" > .cqfd/docker/Dockerfile
echo "ENV CQFD_DEBUG=1" >> .cqfd/docker/Dockerfile

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/.cqfd/centos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM centos:centos7
MAINTAINER The CentOS Project <cloud-ops@centos.org>
LABEL org.opencontainers.image.authors="cloud-ops@centos.org"
4 changes: 2 additions & 2 deletions tests/test_data/.cqfd/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:14.04
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
make \
Expand Down
4 changes: 2 additions & 2 deletions tests/test_data/.cqfd/docker/Dockerfile.build_context
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:14.04
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends make

Expand Down
4 changes: 2 additions & 2 deletions tests/test_data/.cqfd/docker/Dockerfile.init_extra_env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:14.04
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends make

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM alpine:3.8
FROM alpine:3.20

RUN apk update && apk upgrade

0 comments on commit 1bf553b

Please sign in to comment.