Skip to content

Commit

Permalink
Expand test script
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenMaude committed May 15, 2024
1 parent 297d3e9 commit 96295ca
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion tests/dev_container.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
#!/bin/sh
#!/bin/bash
set -euxo pipefail

# Check that we are the rstudio user.
[ "$(whoami)" == "rstudio" ]

# Check the OpenSAFELY research-template example runs.
opensafely run run_all

# Check the Python packages are as the Python image from which they are taken.
python_image_version="v2"
opensafely pull "python:$python_image_version"

docker_python_packages=$(docker run ghcr.io/opensafely-core/python:$python_image_version python -m pip freeze)
local_python_packages=$(/opt/venv/bin/python3.10 -m pip freeze)
diff <(echo "$local_python_packages") <(echo "$docker_python_packages")

# Check the RStudio server is running.
curl -L http://localhost:8787 | grep "RStudio"

# Check the RStudio server installation
sudo rstudio-server stop
sudo rstudio-server verify-installation

0 comments on commit 96295ca

Please sign in to comment.