Skip to content
Snippets Groups Projects
Commit acebdb01 authored by Teemu Autto's avatar Teemu Autto
Browse files

Fetch `/server-info` using `requests` library.

parent c3bda880
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ test = [
"pytest",
"coverage",
"coverage[toml]",
"requests",
]
docs = [
"mkdocs",
......
......@@ -5,6 +5,7 @@ Smoketests
Thease are tests that run in gitlab runner, but they target review or staging
environment.
"""
import requests
import pytest
......@@ -33,5 +34,8 @@ def test_server_status(deployment_address: str, path="/server-info"):
Fetch server status page and checks for Falsies.
"""
print(f"Checking {deployment_address}{path}")
assert deployment_address is not None, "Deployment address is not defined"
deployment_address = deployment_address.rstrip("/")
resp = requests.get(deployment_address + path, timeout=5)
assert resp.status_code == 200
assert resp.headers['Content-Type'] == 'application/json'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment