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
Merge requests
!274
Resolve "(CTTC) Multiple CI/CD pipeline fixes"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "(CTTC) Multiple CI/CD pipeline fixes"
feat/200-cttc-multiple-ci-cd-pipeline-fixes
into
develop
Overview
0
Commits
1
Pipelines
3
Changes
2
Merged
Lluis Gifre Renom
requested to merge
feat/200-cttc-multiple-ci-cd-pipeline-fixes
into
develop
6 months ago
Overview
0
Commits
1
Pipelines
3
Changes
2
Expand
Closes
#200 (closed)
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
a02690a7
1 commit,
6 months ago
2 files
+
5
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/context/tests/conftest.py
+
3
−
4
Options
@@ -18,8 +18,9 @@ from _pytest.terminal import TerminalReporter
from
typing
import
Tuple
from
common.Constants
import
ServiceNameEnum
from
common.Settings
import
(
ENVVAR_SUFIX_SERVICE_HOST
,
ENVVAR_SUFIX_SERVICE_PORT_GRPC
,
ENVVAR_SUFIX_SERVICE_PORT_HTTP
,
get_env_var_name
,
get_service_port_grpc
,
get_service_port_http
)
ENVVAR_SUFIX_SERVICE_HOST
,
ENVVAR_SUFIX_SERVICE_PORT_GRPC
,
get_env_var_name
,
get_service_port_grpc
)
from
common.message_broker.Factory
import
get_messagebroker_backend
from
common.message_broker.MessageBroker
import
MessageBroker
from
common.method_wrappers.Decorator
import
MetricsPool
@@ -30,11 +31,9 @@ from context.service.database.models._Base import rebuild_database
LOCAL_HOST
=
'
127.0.0.1
'
GRPC_PORT
=
10000
+
int
(
get_service_port_grpc
(
ServiceNameEnum
.
CONTEXT
))
# avoid privileged ports
HTTP_PORT
=
10000
+
int
(
get_service_port_http
(
ServiceNameEnum
.
CONTEXT
))
# avoid privileged ports
os
.
environ
[
get_env_var_name
(
ServiceNameEnum
.
CONTEXT
,
ENVVAR_SUFIX_SERVICE_HOST
)]
=
str
(
LOCAL_HOST
)
os
.
environ
[
get_env_var_name
(
ServiceNameEnum
.
CONTEXT
,
ENVVAR_SUFIX_SERVICE_PORT_GRPC
)]
=
str
(
GRPC_PORT
)
os
.
environ
[
get_env_var_name
(
ServiceNameEnum
.
CONTEXT
,
ENVVAR_SUFIX_SERVICE_PORT_HTTP
)]
=
str
(
HTTP_PORT
)
@pytest.fixture
(
scope
=
'
session
'
)
def
context_db_mb
(
request
)
->
Tuple
[
sqlalchemy
.
engine
.
Engine
,
MessageBroker
]:
# pylint: disable=unused-argument
Loading