Skip to content

Commit

Permalink
Add redis-server to devcontainer for local running of tests to pass (#37
Browse files Browse the repository at this point in the history
)

Got tests to pass when running in devcontainer

These commands get around rc policy that prevents the redis server from starting. I also upgraded the image to 3.9 because the command does not work on python 3.8
  • Loading branch information
paxnovem authored May 22, 2024
1 parent aa913ac commit a47408d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "pallets-eco/flask-rq",
"image": "mcr.microsoft.com/devcontainers/python:3.8",
"image": "mcr.microsoft.com/devcontainers/python:3.9",
"remoteUser": "root",
"customizations": {
"vscode": {
"settings": {
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/on-create-command.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
printf '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d
sudo apt-get update && sudo apt-get install -y redis-server
set -e
python3 -m venv --upgrade-deps .venv
. .venv/bin/activate
Expand Down

0 comments on commit a47408d

Please sign in to comment.