flake8: freeze> python -m pip freeze --all code: install_deps> python -I -m pip install confluent-kafka coverage flask future gevent jsonschema kafka-python mock pytest pytest-cov pytest-mock PyYAML requests requests_mock flake8: pip==24.0,setuptools==69.5.1,wheel==0.43.0 flake8: OK ✔ in 1.86 seconds code: freeze> python -m pip freeze --all code: attrs==23.2.0,blinker==1.8.2,certifi==2024.2.2,charset-normalizer==3.3.2,click==8.1.7,confluent-kafka==2.4.0,coverage==7.5.3,exceptiongroup==1.2.1,Flask==3.0.3,future==1.0.0,gevent==24.2.1,greenlet==3.0.3,idna==3.7,iniconfig==2.0.0,itsdangerous==2.2.0,Jinja2==3.1.4,jsonschema==4.22.0,jsonschema-specifications==2023.12.1,kafka-python==2.0.2,MarkupSafe==2.1.5,mock==5.1.0,packaging==24.0,pip==24.0,pluggy==1.5.0,pytest==8.2.1,pytest-cov==5.0.0,pytest-mock==3.14.0,PyYAML==6.0.1,referencing==0.35.1,requests==2.32.3,requests-mock==1.12.1,rpds-py==0.18.1,setuptools==69.5.1,tomli==2.0.1,urllib3==2.2.1,Werkzeug==3.0.3,wheel==0.43.0,zope.event==5.0,zope.interface==6.4.post2 code: commands[0]> pytest --ignore=functionaltest --ignore=collector --cov /w/workspace/smo-ves-cli-sonar --cov-report xml --cov-report term-missing --cov-report html --cov-fail-under=70 --junitxml=/w/workspace/smo-ves-cli-sonar/tmp/tests.xml ============================= test session starts ============================== platform linux -- Python 3.10.6, pytest-8.2.1, pluggy-1.5.0 cachedir: .tox/code/.pytest_cache rootdir: /w/workspace/smo-ves-cli-sonar plugins: mock-3.14.0, cov-5.0.0, requests-mock-1.12.1 collected 114 items tests/collector/test_monitor.py ................................... [ 30%] tests/collector/test_rest_dispatcher.py .... [ 34%] tests/dmaap_adaptor/test_appConfig.py ....... [ 40%] tests/dmaap_adaptor/test_consumer.py ............ [ 50%] tests/dmaap_adaptor/test_dmaap_adapter.py ..ss.... [ 57%] tests/dmaap_adaptor/test_prepare_response.py .... [ 61%] tests/influxdb_connector/test_influxdb_connector.py .... [ 64%] tests/influxdb_connector/test_influxdb_events.py ....................... [ 85%] ................. [100%] =============================== warnings summary =============================== influxdb-connector/influxdb-connector/code/influxdb_connector.py:240 /w/workspace/smo-ves-cli-sonar/influxdb-connector/influxdb-connector/code/influxdb_connector.py:240: DeprecationWarning: invalid escape sequence '\ ' for search_char, replace_char in {" ": "\ ", ",": "\,"}.items(): influxdb-connector/influxdb-connector/code/influxdb_connector.py:240 /w/workspace/smo-ves-cli-sonar/influxdb-connector/influxdb-connector/code/influxdb_connector.py:240: DeprecationWarning: invalid escape sequence '\,' for search_char, replace_char in {" ": "\ ", ",": "\,"}.items(): tests/influxdb_connector/test_influxdb_events.py:423 /w/workspace/smo-ves-cli-sonar/tests/influxdb_connector/test_influxdb_events.py:423: DeprecationWarning: invalid escape sequence '\,' data = "measurement,domain=measurement,eventId=O-RAN-FH-IPv6-01_1639984500_PM15min,eventName=measurement_O_RAN_COMPONENT_PM15min,eventType=O_RAN_COMPONENT_PM15min,priority=Low,reportingEntityName=ORAN-DEV,sourceName=O-RAN-FH-IPv6-01,intervalStartTime=Mon\,\ 20\ Dec\ 2021\ 07:00:00\ +0000,intervalEndTime=Mon\,\ 20\ Dec\ 2021\ 07:15:00\ +0000,version=4.1,vesEventListenerVersion=7.2.1" tests/collector/test_monitor.py::test_listener tests/collector/test_monitor.py::test_schema_ref_url tests/collector/test_monitor.py::test_gerrit_schema_ref_url /w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/code/collector/monitor.py:204: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead logger.warn('Failed to authenticate OK; creds: ' , credentials) tests/collector/test_monitor.py::test_listener_jsonschema_validation /w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/code/collector/monitor.py:234: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead logger.warn('Event is not valid against schema! {0}'.format(e)) tests/collector/test_monitor.py::test_listener_jsonschema_validation /w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/code/collector/monitor.py:235: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead logger.warn('Bad JSON body decoded:\n' tests/collector/test_monitor.py::test_listener_schma_is_empty /w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/code/collector/monitor.py:252: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead logger.warn('Valid JSON body (no schema checking) decoded:\n' tests/collector/test_monitor.py::test_listener_schma_is_empty /w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/code/collector/monitor.py:257: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead logger.warn('Event is valid JSON but not checked against schema!') tests/collector/test_monitor.py::test_TestControl_listener_schema_validation_error /w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/code/collector/monitor.py:396: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead logger.warn('TestControl input not valid: {0}'.format(e)) tests/collector/test_monitor.py::test_TestControl_listener_schema_validation_error /w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/code/collector/monitor.py:397: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead logger.warn('Bad JSON body decoded:\n' -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ------- generated xml file: /w/workspace/smo-ves-cli-sonar/tmp/tests.xml ------- ---------- coverage: platform linux, python 3.10.6-final-0 ----------- Name Stmts Miss Cover Missing ------------------------------------------------------------------------------------------------ collector/evel-test-collector/code/collector/monitor.py 339 0 100% collector/evel-test-collector/code/collector/rest_dispatcher.py 26 0 100% dmaapadapter/adapter/code/app_config.py 43 0 100% dmaapadapter/adapter/code/consumer.py 106 10 91% 55, 62-70, 74 dmaapadapter/adapter/code/dmaap_adapter.py 63 20 68% 56-63, 68-85 dmaapadapter/adapter/code/prepare_response.py 12 0 100% influxdb-connector/influxdb-connector/code/influxdb_connector.py 286 57 80% 343-470 tests/__init__.py 0 0 100% tests/collector/__init__.py 27 18 33% 26-44 tests/collector/test_monitor.py 474 19 96% 162-165, 400-403, 420-423, 460-463, 511-512, 862 tests/collector/test_rest_dispatcher.py 48 0 100% tests/dmaap_adaptor/__init__.py 5 0 100% tests/dmaap_adaptor/test_appConfig.py 68 0 100% tests/dmaap_adaptor/test_consumer.py 132 0 100% tests/dmaap_adaptor/test_dmaap_adapter.py 104 22 79% 43-47, 53-57, 65-69, 76-80, 84-85 tests/dmaap_adaptor/test_prepare_response.py 23 0 100% tests/influxdb_connector/__init__.py 5 0 100% tests/influxdb_connector/test_influxdb_connector.py 29 0 100% tests/influxdb_connector/test_influxdb_events.py 445 9 98% 35, 306-312, 1219-1220, 1239-1240, 1263-1264 ------------------------------------------------------------------------------------------------ TOTAL 2235 155 93% Coverage HTML written to dir htmlcov Coverage XML written to file coverage.xml Required test coverage of 70% reached. Total coverage: 93.06% ================= 112 passed, 2 skipped, 12 warnings in 6.10s ================== code: OK (18.04=setup[11.34]+cmd[6.70] seconds) flake8: OK (1.86 seconds) congratulations :) (18.20 seconds)