Loading .gitlab-ci.yml +4 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,8 @@ stages: - test - dependencies - deploy - integration_test - integration - functional # include the individual .gitlab-ci.yml of each micro-service include: Loading @@ -13,4 +14,5 @@ include: - local: '/src/context/.gitlab-ci.yml' - local: '/src/device/.gitlab-ci.yml' - local: '/src/service/.gitlab-ci.yml' - local: '/src/integration_tester/.gitlab-ci.yml' - local: '/src/tester_integration/.gitlab-ci.yml' - local: '/src/tester_functional/.gitlab-ci.yml' run_integration_tests.sh→run_in_kubernetes.sh +0 −0 File moved. View file run_local_tests.sh 0 → 100755 +32 −0 Original line number Diff line number Diff line #!/bin/bash cd $(dirname $0)/src RCFILE=~/teraflow/controller/coverage/.coveragerc COVERAGEFILE=~/teraflow/controller/coverage/.coverage # Run unitary tests and analyze coverage of code at same time # First destroy old coverage file rm -f $COVERAGEFILE coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ common/database/tests/test_unitary.py \ common/database/tests/test_engine_inmemory.py coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ context/tests/test_unitary.py coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ device/tests/test_unitary.py coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ service/tests/test_unitary.py # Run integration tests and analyze coverage of code at same time export DB_ENGINE='redis' export REDIS_SERVICE_HOST='10.1.7.194' export REDIS_SERVICE_PORT='31789' export REDIS_DATABASE_ID='0' coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ common/database/tests/test_engine_redis.py \ tester_integration/test_context_device_service.py run_unitary_tests.shdeleted 100755 → 0 +0 −17 Original line number Diff line number Diff line #!/bin/bash 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 integration tests and analyze coverage of code at same time #coverage run --rcfile=$RCFILE --append -m pytest --log-level=WARN --verbose \ # common/database/tests/test_integration_redis.py \ # device/tests/test_integration.py src/common/database/api/context/service/Constraint.py +3 −4 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ class Constraint(_Entity): def dump(self) -> Dict: attributes = self.attributes.get() return { 'constraint_type': self.constraint_type, 'constraint_value': attributes.get('constraint_value', None), } result = self.dump_id() result.update({'constraint_value': attributes.get('constraint_value', None)}) return result Loading
.gitlab-ci.yml +4 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,8 @@ stages: - test - dependencies - deploy - integration_test - integration - functional # include the individual .gitlab-ci.yml of each micro-service include: Loading @@ -13,4 +14,5 @@ include: - local: '/src/context/.gitlab-ci.yml' - local: '/src/device/.gitlab-ci.yml' - local: '/src/service/.gitlab-ci.yml' - local: '/src/integration_tester/.gitlab-ci.yml' - local: '/src/tester_integration/.gitlab-ci.yml' - local: '/src/tester_functional/.gitlab-ci.yml'
run_local_tests.sh 0 → 100755 +32 −0 Original line number Diff line number Diff line #!/bin/bash cd $(dirname $0)/src RCFILE=~/teraflow/controller/coverage/.coveragerc COVERAGEFILE=~/teraflow/controller/coverage/.coverage # Run unitary tests and analyze coverage of code at same time # First destroy old coverage file rm -f $COVERAGEFILE coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ common/database/tests/test_unitary.py \ common/database/tests/test_engine_inmemory.py coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ context/tests/test_unitary.py coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ device/tests/test_unitary.py coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ service/tests/test_unitary.py # Run integration tests and analyze coverage of code at same time export DB_ENGINE='redis' export REDIS_SERVICE_HOST='10.1.7.194' export REDIS_SERVICE_PORT='31789' export REDIS_DATABASE_ID='0' coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ common/database/tests/test_engine_redis.py \ tester_integration/test_context_device_service.py
run_unitary_tests.shdeleted 100755 → 0 +0 −17 Original line number Diff line number Diff line #!/bin/bash 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 integration tests and analyze coverage of code at same time #coverage run --rcfile=$RCFILE --append -m pytest --log-level=WARN --verbose \ # common/database/tests/test_integration_redis.py \ # device/tests/test_integration.py
src/common/database/api/context/service/Constraint.py +3 −4 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ class Constraint(_Entity): def dump(self) -> Dict: attributes = self.attributes.get() return { 'constraint_type': self.constraint_type, 'constraint_value': attributes.get('constraint_value', None), } result = self.dump_id() result.update({'constraint_value': attributes.get('constraint_value', None)}) return result