Commit 90ba0581 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Bug resolution in unitary testing of Service

parent d0f7ac4e
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -3,16 +3,12 @@
cd $(dirname $0)/src
RCFILE=~/teraflow/controller/coverage/.coveragerc

## Run unitary tests and analyze coverage of code at same time
#coverage run --rcfile=$RCFILE -m pytest --log-level=DEBUG --verbose \
#    common/database/tests/test_unitary.py \
#    common/database/tests/test_engine_inmemory.py \
#    context/tests/test_unitary.py \
#    device/tests/test_unitary.py \
#    service/tests/test_unitary.py

# Run unitary tests and analyze coverage of code at same time
coverage run --rcfile=$RCFILE -m pytest --log-level=DEBUG --verbose \
    common/database/tests/test_unitary.py \
    common/database/tests/test_engine_inmemory.py \
    context/tests/test_unitary.py \
    device/tests/test_unitary.py \
    service/tests/test_unitary.py

## Run integration tests and analyze coverage of code at same time
+2 −0
Original line number Diff line number Diff line
@@ -156,6 +156,8 @@ def check_device_endpoint_exists(
        raise ServiceException(grpc.StatusCode.NOT_FOUND, msg)
    db_context = database.context(context_id)

    print('db_context.topologies', str(db_context.topologies.get()))

    if not db_context.topologies.contains(topology_id):
        msg = 'Context({})/Topology({}) in {} does not exist in the database.'
        msg = msg.format(context_id, topology_id, parent_name)