removing rsync dependency, using cp -R instead, reducing wait time in test

This commit is contained in:
rigzba21
2021-08-06 14:55:58 -04:00
parent 9d9b76909d
commit 0dbce4526e
3 changed files with 2 additions and 5 deletions

View File

@@ -42,7 +42,6 @@ RUN apt-get update --yes && \
wget \ wget \
ca-certificates \ ca-certificates \
sudo \ sudo \
rsync \
locales \ locales \
fonts-liberation \ fonts-liberation \
run-one && \ run-one && \

View File

@@ -55,7 +55,7 @@ if [ "$(id -u)" == 0 ] ; then
if [[ ! -e "/home/${NB_USER}" ]]; then if [[ ! -e "/home/${NB_USER}" ]]; then
echo "Relocating home dir to /home/${NB_USER}" echo "Relocating home dir to /home/${NB_USER}"
mkdir "/home/${NB_USER}" mkdir "/home/${NB_USER}"
rsync -avx /home/jovyan "/home/${NB_USER}" || ln -s /home/jovyan "/home/${NB_USER}" cp -R /home/jovyan "/home/${NB_USER}" || ln -s /home/jovyan "/home/${NB_USER}"
fi fi
# if workdir is in /home/jovyan, cd to /home/${NB_USER} # if workdir is in /home/jovyan, cd to /home/${NB_USER}
if [[ "${PWD}/" == "/home/jovyan/"* ]]; then if [[ "${PWD}/" == "/home/jovyan/"* ]]; then

View File

@@ -209,8 +209,6 @@ def test_container_not_delete_bind_mount(container, tmp_path):
volumes={d: {"bind": "/home/jovyan/data", "mode": "rw"}}, volumes={d: {"bind": "/home/jovyan/data", "mode": "rw"}},
command=["start.sh", "jupyter", "lab"], command=["start.sh", "jupyter", "lab"],
) )
time.sleep(2)
time.sleep(10)
assert p.read_text() == "some-content" assert p.read_text() == "some-content"
assert len(list(tmp_path.iterdir())) == 1 assert len(list(tmp_path.iterdir())) == 1