Skip to content
Snippets Groups Projects
Commit 536786b5 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

NBI component:

- Fixing CI/CD pipeline
parent 274c3cdb
No related branches found
No related tags found
3 merge requests!359Release TeraFlowSDN 5.0,!322Resolve "(CTTC) Update NBI WebSocket endpoints to Flask-SocketIO and use gunicorn",!286Resolve "(CTTC) Implement integration test between E2E-IP-Optical SDN Controllers"
......@@ -79,8 +79,6 @@ unit_test nbi:
- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml"
- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml"
- docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
- ls -la $PWD/src/$IMAGE_NAME/tests
- cat $PWD/src/$IMAGE_NAME/tests/mock_service_dependencies.log
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
after_script:
- docker rm -f $IMAGE_NAME
......@@ -101,8 +99,6 @@ unit_test nbi:
when: always
reports:
junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml
paths:
- src/$IMAGE_NAME/tests/mock_service_dependencies.log
## Deployment of the service in Kubernetes Cluster
#deploy nbi:
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging, os, signal, sys, threading
import logging, signal, sys, threading
from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server
from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server
from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server
......@@ -23,20 +23,11 @@ from common.tools.service.GenericGrpcService import GenericGrpcService
from .Constants import LOCAL_HOST, MOCKSERVICE_PORT
if 'GITLAB_CI' in os.environ:
log_path = '/opt/results/mock_service_dependencies.log'
else:
log_path = 'mock_service_dependencies.log'
logging.basicConfig(
level=logging.DEBUG,
format='[%(asctime)s] %(levelname)s:%(name)s:%(message)s',
#filename=log_path,
)
LOGGER = logging.getLogger(__name__)
LOGGER.warning('environ={:s}'.format(str(os.environ)))
LOGGER.warning('GITLAB_CI={:s}'.format(str(os.environ.get('GITLAB_CI'))))
LOGGER.warning('log_path={:s}'.format(str(log_path)))
class MockService_Dependencies(GenericGrpcService):
# Mock Service implementing Context, Service and Slice to simplify unitary tests of NBI
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment