Skip to content

Commit

Permalink
Merge pull request #14498 from joshrwolf/tests/py3-flask
Browse files Browse the repository at this point in the history
add py3-flask tests
  • Loading branch information
cpanato committed Mar 11, 2024
2 parents b019ac8 + ff53abe commit f6869ba
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 f6869ba

Please sign in to comment.