Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
TFS
controller
Commits
f0a126e6
Commit
f0a126e6
authored
1 year ago
by
Carlos Natalino Da Silva
Browse files
Options
Downloads
Patches
Plain Diff
Fixing tests for dbscanserving.
parent
1d7d9178
No related branches found
No related tags found
2 merge requests
!142
Release TeraFlowSDN 2.1
,
!138
Fixing the tests of the optical cybersecurity components
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dbscanserving/.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
src/dbscanserving/.gitlab-ci.yml
src/dbscanserving/tests/test_unitary.py
+3
-6
3 additions, 6 deletions
src/dbscanserving/tests/test_unitary.py
with
4 additions
and
7 deletions
src/dbscanserving/.gitlab-ci.yml
+
1
−
1
View file @
f0a126e6
...
...
@@ -54,7 +54,7 @@ unit_test dbscanserving:
-
sleep
5
-
docker ps -a
-
docker logs $IMAGE_NAME
-
docker
exec
ps -a
-
docker ps -a
-
sleep
5
-
docker logs $IMAGE_NAME
-
docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/home/${IMAGE_NAME}/results/${IMAGE_NAME}_report.xml"
...
...
This diff is collapsed.
Click to expand it.
src/dbscanserving/tests/test_unitary.py
+
3
−
6
View file @
f0a126e6
...
...
@@ -23,30 +23,27 @@ from common.proto.dbscanserving_pb2 import (DetectionRequest,
DetectionResponse
,
Sample
)
from
dbscanserving.client.DbscanServingClient
import
DbscanServingClient
from
dbscanserving.Config
import
GRPC_SERVICE_PORT
from
dbscanserving.service.DbscanService
import
DbscanService
port
=
10000
+
GRPC_SERVICE_PORT
# avoid privileged ports
LOGGER
=
logging
.
getLogger
(
__name__
)
LOGGER
.
setLevel
(
logging
.
DEBUG
)
@pytest.fixture
(
scope
=
"
session
"
)
def
dbscanserving_service
():
_service
=
DbscanService
(
port
=
port
)
_service
=
DbscanService
()
_service
.
start
()
yield
_service
_service
.
stop
()
@pytest.fixture
(
scope
=
"
session
"
)
def
dbscanserving_client
():
def
dbscanserving_client
(
dbscanserving_service
:
DbscanService
):
with
patch
.
dict
(
os
.
environ
,
{
"
DBSCANSERVINGSERVICE_SERVICE_HOST
"
:
"
127.0.0.1
"
,
"
DBSCANSERVINGSERVICE_SERVICE_PORT_GRPC
"
:
str
(
port
),
"
DBSCANSERVINGSERVICE_SERVICE_PORT_GRPC
"
:
str
(
dbscanserving_service
.
bind_
port
),
},
clear
=
True
,
):
...
...
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