Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DataCatalog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
eFlows4HPC WP2
DataCatalog
Commits
eff72a69
Commit
eff72a69
authored
3 years ago
by
Jedrzej Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
test using testcase
parent
2952a420
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/apiserver_tests/test_responsiveness.py
+13
-10
13 additions, 10 deletions
tests/apiserver_tests/test_responsiveness.py
with
13 additions
and
10 deletions
tests/apiserver_tests/test_responsiveness.py
+
13
−
10
View file @
eff72a69
...
@@ -5,19 +5,22 @@ from fastapi.testclient import TestClient
...
@@ -5,19 +5,22 @@ from fastapi.testclient import TestClient
from
context
import
apiserver
from
context
import
apiserver
from
context
import
storage
from
context
import
storage
import
unittest
client
=
TestClient
(
apiserver
.
app
)
# get root
class
SomeTests
(
unittest
.
TestCase
):
def
test_root
():
def
setUp
(
self
):
rsp
=
client
.
get
(
'
/
'
)
self
.
client
=
TestClient
(
apiserver
.
app
)
assert
rsp
.
status_code
>=
200
and
rsp
.
status_code
<
300
# any 200 response is fine, as a get to the root should not return any error
# get every type in type enum
def
test_types
():
def
test_root
(
self
):
for
location_type
in
storage
.
LocationDataType
:
rsp
=
self
.
client
.
get
(
'
/
'
)
rsp
=
client
.
get
(
'
/
'
+
location_type
.
value
)
assert
rsp
.
status_code
>=
200
and
rsp
.
status_code
<
300
# any 200 response is fine, as a get to the root should not return any error
assert
rsp
.
status_code
>=
200
and
rsp
.
status_code
<
300
# any 200 response is fine, as a get to the datatypes should not return any error
def
test_types
(
self
):
for
location_type
in
storage
.
LocationDataType
:
rsp
=
self
.
client
.
get
(
'
/
'
+
location_type
.
value
)
assert
rsp
.
status_code
>=
200
and
rsp
.
status_code
<
300
# any 200 response is fine, as a get to the datatypes should not return any error
# PUT a new dataset, store the id in global variable
# PUT a new dataset, store the id in global variable
...
...
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