Skip to content

Commit

Permalink
add tests for py3-flask
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Wolf <josh@wolfs.io>
  • Loading branch information
joshrwolf committed Mar 9, 2024
1 parent cf3e3fb commit ff53abe
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions py3-flask.yaml
Expand Up @@ -41,3 +41,27 @@ update:
enabled: true
release-monitor:
identifier: 3867

test:
environment:
contents:
packages:
- curl
environment:
FLASK_APP: "/tmp/flask_app.py"
pipeline:
- name: Test Flask Installation and Server Running Capability
runs: |
cat <<EOF > /tmp/flask_app.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
EOF
export FLASK_APP=/tmp/flask_app.py
flask run &> /dev/null &
flask_pid=$!
sleep 2
curl -s "http://127.0.0.1:5000/" | grep -q "Hello, World!"

0 comments on commit ff53abe

Please sign in to comment.