From 3fdcb7c3a2e684dd8861ad92a573fe13c5cf277d Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sat, 30 Mar 2024 07:21:26 +0100 Subject: [PATCH] Trial not needing to pass -it to docker run and exec --- .github/workflows/test.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dc2b8c4d..fcf9b8bb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -60,7 +60,7 @@ jobs: - name: Test vncserver if: always() run: | - container_id=$(docker run -d -it -p 5901:5901 test vncserver -xstartup /opt/install/jupyter_remote_desktop_proxy/share/xstartup -verbose -fg -geometry 1680x1050 -SecurityTypes None -rfbport 5901) + container_id=$(docker run -d -p 5901:5901 test vncserver -xstartup /opt/install/jupyter_remote_desktop_proxy/share/xstartup -verbose -fg -geometry 1680x1050 -SecurityTypes None -rfbport 5901) sleep 1 echo "::group::Install netcat, a test dependency" @@ -70,7 +70,7 @@ jobs: ' echo "::endgroup::" - docker exec -it $container_id timeout --preserve-status 1 nc -v localhost 5901 2>&1 | tee -a /dev/stderr | \ + docker exec $container_id timeout --preserve-status 1 nc -v localhost 5901 2>&1 | tee -a /dev/stderr | \ grep --quiet RFB && echo "Passed test" || { echo "Failed test" && TEST_OK=false; } echo "::group::vncserver logs" @@ -86,7 +86,7 @@ jobs: - name: Test websockify'ed vncserver if: always() run: | - container_id=$(docker run -d -it -p 5901:5901 test websockify --verbose --log-file=/tmp/websockify.log --heartbeat=30 5901 -- vncserver -xstartup /opt/install/jupyter_remote_desktop_proxy/share/xstartup -verbose -fg -geometry 1680x1050 -SecurityTypes None -rfbport 5901) + container_id=$(docker run -d -p 5901:5901 test websockify --verbose --log-file=/tmp/websockify.log --heartbeat=30 5901 -- vncserver -xstartup /opt/install/jupyter_remote_desktop_proxy/share/xstartup -verbose -fg -geometry 1680x1050 -SecurityTypes None -rfbport 5901) sleep 1 echo "::group::Install websocat, a test dependency" @@ -97,7 +97,7 @@ jobs: ' echo "::endgroup::" - docker exec -it $container_id websocat --binary --one-message --exit-on-eof "ws://localhost:5901/" 2>&1 | tee -a /dev/stderr | \ + docker exec $container_id websocat --binary --one-message --exit-on-eof "ws://localhost:5901/" 2>&1 | tee -a /dev/stderr | \ grep --quiet RFB && echo "Passed test" || { echo "Failed test" && TEST_OK=false; } echo "::group::websockify logs" @@ -117,7 +117,7 @@ jobs: - name: Test project's proxy to websockify'ed vncserver if: always() run: | - container_id=$(docker run -d -it -p 8888:8888 -e JUPYTER_TOKEN=secret test) + container_id=$(docker run -d -p 8888:8888 -e JUPYTER_TOKEN=secret test) sleep 3 curl --silent --fail 'http://localhost:8888/desktop/?token=secret' | grep --quiet 'Jupyter Remote Desktop Proxy' && echo "Passed get index.html test" || { echo "Failed get index.html test" && TEST_OK=false; }