Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TJTS5901 K23 Template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Startuplab
Courses
TJTS5901 Continuous Software Engineering
TJTS5901 K23 Template
Commits
acebdb01
Commit
acebdb01
authored
2 years ago
by
Teemu Autto
Browse files
Options
Downloads
Patches
Plain Diff
Fetch `/server-info` using `requests` library.
parent
c3bda880
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyproject.toml
+1
-0
1 addition, 0 deletions
pyproject.toml
tests/test_smoke.py
+6
-2
6 additions, 2 deletions
tests/test_smoke.py
with
7 additions
and
2 deletions
pyproject.toml
+
1
−
0
View file @
acebdb01
...
...
@@ -30,6 +30,7 @@ test = [
"pytest"
,
"coverage"
,
"coverage[toml]"
,
"requests"
,
]
docs
=
[
"mkdocs"
,
...
...
This diff is collapsed.
Click to expand it.
tests/test_smoke.py
+
6
−
2
View file @
acebdb01
...
...
@@ -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
'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment