[TMP] Add test to check if image is freshly built

This commit is contained in:
Ayaz Salikhov
2022-05-13 02:59:40 +03:00
parent dbd5325837
commit cfb7fd6ca1
3 changed files with 10 additions and 0 deletions

View File

@@ -103,6 +103,7 @@ RUN mkdir "/home/${NB_USER}/work" && \
# Do all this in a single RUN command to avoid duplicating all of the
# files across image layers when the permissions change
COPY --chown="${NB_UID}:${NB_GID}" initial-condarc "${CONDA_DIR}/.condarc"
COPY --chown="${NB_UID}:${NB_GID}" test-file.txt /tmp/test-file.txt
WORKDIR /tmp
RUN set -x && \
arch=$(uname -m) && \

View File

@@ -0,0 +1 @@
test-content

View File

@@ -0,0 +1,8 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from pathlib import Path
file = Path("/tmp/test-file.txt")
assert file.exists()
assert file.read_text() == "test-content\n"