Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

bump py-cpuinfo to 8.0.0 #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim-buster
FROM python:3.9

LABEL Name="Python Flask Demo App" Version=1.4.2
LABEL org.opencontainers.image.source = "https://github.com/benc-uk/python-demoapp"
Expand All @@ -13,4 +13,4 @@ COPY $srcDir/app ./app

EXPOSE 5000

CMD ["gunicorn", "-b", "0.0.0.0:5000", "run:app"]
CMD ["gunicorn", "-b", "0.0.0.0:5000", "run:app"]
8 changes: 5 additions & 3 deletions src/app/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ def test_api_process(client):
assert resp.status_code == 200
assert resp.headers["Content-Type"] == "application/json"
resp_payload = json.loads(resp.data)
assert len(resp_payload["processes"]) > 0
assert resp_payload["processes"][0]["memory_percent"] > 0
assert len(resp_payload["processes"][0]["name"]) > 0
processes = resp_payload["processes"]
print(resp_payload["processes"][0]["memory_percent"])
assert len(processes) > 0
assert resp_payload["processes"][0]["memory_percent"] == None or processes[0]["memory_percent"] > 0
assert len(processes[0]["name"]) == None or len(processes[0]["name"]) > 0


# Test the monitor API returns JSON results we expect
Expand Down
6 changes: 3 additions & 3 deletions src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Flask==1.1.2
py-cpuinfo==7.0.0
Flask==2.1.0
py-cpuinfo==8.0.0
psutil==5.8.0
gunicorn==20.1.0
black==20.8b1
flake8==3.9.0
pytest==6.2.2
pytest==6.2.2