Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
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
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
a34b0668
Verified
Commit
a34b0668
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
finishing touches
parent
5683f63c
No related branches found
No related tags found
1 merge request
!111
Feature/ruff everything party hat emoji
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gso/__init__.py
+1
-1
1 addition, 1 deletion
gso/__init__.py
test/conftest.py
+2
-3
2 additions, 3 deletions
test/conftest.py
tox.ini
+2
-2
2 additions, 2 deletions
tox.ini
with
5 additions
and
6 deletions
gso/__init__.py
+
1
−
1
View file @
a34b0668
...
...
@@ -25,7 +25,7 @@ def init_worker_app() -> OrchestratorCore:
def
init_cli_app
()
->
typer
.
Typer
:
"""
Initialise :term:`GSO` as a CLI application.
"""
from
gso.cli
import
import_sites
from
gso.cli
import
import_sites
# noqa: PLC0415
cli_app
.
add_typer
(
import_sites
.
app
,
name
=
"
import_sites
"
)
cli_app
.
add_typer
(
netbox
.
app
,
name
=
"
netbox-cli
"
)
...
...
This diff is collapsed.
Click to expand it.
test/conftest.py
+
2
−
3
View file @
a34b0668
...
...
@@ -13,6 +13,7 @@ from alembic import command
from
alembic.config
import
Config
from
faker
import
Faker
from
faker.providers
import
BaseProvider
from
oauth2_lib.settings
import
oauth2lib_settings
from
orchestrator
import
app_settings
from
orchestrator.db
import
Database
,
db
from
orchestrator.db.database
import
ENGINE_ARGUMENTS
,
SESSION_ARGUMENTS
,
BaseModel
...
...
@@ -306,13 +307,11 @@ def _db_session(_database):
@pytest.fixture
(
scope
=
"
session
"
,
autouse
=
True
)
def
fastapi_app
(
database
,
db_uri
):
def
fastapi_app
(
_
database
,
db_uri
):
"""
Load the GSO FastAPI app for testing purposes.
This implementation is as close as possible to the one present in orchestrator-core.
"""
from
oauth2_lib.settings
import
oauth2lib_settings
oauth2lib_settings
.
OAUTH2_ACTIVE
=
False
oauth2lib_settings
.
ENVIRONMENT_IGNORE_MUTATION_DISABLED
=
[
"
local
"
,
"
TESTING
"
]
app_settings
.
DATABASE_URI
=
db_uri
...
...
This diff is collapsed.
Click to expand it.
tox.ini
+
2
−
2
View file @
a34b0668
...
...
@@ -17,8 +17,8 @@ deps =
-r
requirements.txt
commands
=
ruff
.
ruff
format
--respect-gitignore
--preview
--check
.
ruff
--preview
.
ruff
format
--respect-gitignore
--preview
.
mypy
.
coverage
erase
coverage
run
--source
gso
--omit
=
"gso/migrations/*"
-m pytest {posargs}
...
...
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