Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LSO
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
LSO
Commits
7a652eda
Verified
Commit
7a652eda
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
update package versioning, and add unit test for version endpoint
parent
55b79852
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!51
Feature/update callback
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lso/routes/default.py
+2
-2
2 additions, 2 deletions
lso/routes/default.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
test/routes/test_default.py
+19
-0
19 additions, 0 deletions
test/routes/test_default.py
with
22 additions
and
3 deletions
lso/routes/default.py
+
2
−
2
View file @
7a652eda
...
@@ -7,8 +7,8 @@ from importlib import metadata
...
@@ -7,8 +7,8 @@ from importlib import metadata
from
fastapi
import
APIRouter
from
fastapi
import
APIRouter
from
pydantic
import
BaseModel
,
constr
from
pydantic
import
BaseModel
,
constr
API_VERSION
=
"
1
"
API_VERSION
=
"
0.1.
1
"
VersionString
=
constr
(
pattern
=
r
"
\d+\.\d+
"
)
VersionString
=
constr
(
pattern
=
r
"
\d+\.\d+
\.\d+
"
)
router
=
APIRouter
()
router
=
APIRouter
()
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
7a652eda
...
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
...
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup
(
setup
(
name
=
"
goat-lso
"
,
name
=
"
goat-lso
"
,
version
=
"
0.1
"
,
version
=
"
0.1
.0
"
,
author
=
"
GÉANT Orchestration & Automation Team
"
,
author
=
"
GÉANT Orchestration & Automation Team
"
,
author_email
=
"
TBD
"
,
author_email
=
"
TBD
"
,
description
=
"
Lightweight Service Orchestrator
"
,
description
=
"
Lightweight Service Orchestrator
"
,
...
...
This diff is collapsed.
Click to expand it.
test/routes/test_default.py
0 → 100644
+
19
−
0
View file @
7a652eda
from
importlib
import
metadata
import
jsonschema
import
responses
from
starlette.testclient
import
TestClient
from
lso.routes.default
import
API_VERSION
,
Version
@responses.activate
def
test_ip_trunk_modification
(
client
:
TestClient
)
->
None
:
rv
=
client
.
get
(
"
/api/version/
"
)
assert
rv
.
status_code
==
200
response
=
rv
.
json
()
jsonschema
.
validate
(
response
,
Version
.
model_json_schema
())
assert
response
[
"
api
"
]
==
API_VERSION
assert
response
[
"
module
"
]
==
metadata
.
version
(
"
goat-lso
"
)
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