Started by timer Running as SYSTEM [EnvInject] - Loading node environment variables. Building remotely on prd-ubuntu1804-builder-2c-2g-4582 (ubuntu1804-builder-2c-2g) in workspace /w/workspace/smo-ves-cli-sonar The recommended git tool is: NONE using credential jenkins Wiping out workspace first. Cloning the remote Git repository Cloning repository ssh://oran-jobbuilder@gerrit.o-ran-sc.org:29418/smo/ves > git init /w/workspace/smo-ves-cli-sonar # timeout=10 Fetching upstream changes from ssh://oran-jobbuilder@gerrit.o-ran-sc.org:29418/smo/ves > git --version # timeout=10 > git --version # 'git version 2.17.1' using GIT_SSH to set credentials jenkins > git fetch --tags --progress -- ssh://oran-jobbuilder@gerrit.o-ran-sc.org:29418/smo/ves +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url ssh://oran-jobbuilder@gerrit.o-ran-sc.org:29418/smo/ves # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 Avoid second fetch > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 Checking out Revision c49f023e9b29f413db3d8503d37c1a34f5563724 (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f c49f023e9b29f413db3d8503d37c1a34f5563724 # timeout=10 Commit message: "CI: Add SonarCloud scan GHA workflow" > git rev-list --no-walk c49f023e9b29f413db3d8503d37c1a34f5563724 # timeout=10 [smo-ves-cli-sonar] $ /bin/bash /tmp/jenkins3061204653046600773.sh ---> python-tools-install.sh Setup pyenv: * system (set by /opt/pyenv/version) * 3.8.13 (set by /opt/pyenv/version) * 3.9.13 (set by /opt/pyenv/version) * 3.10.6 (set by /opt/pyenv/version) lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-SU5Q lf-activate-venv(): INFO: Save venv in file: /tmp/.os_lf_venv lf-activate-venv(): INFO: Installing: lftools lf-activate-venv(): INFO: Adding /tmp/venv-SU5Q/bin to PATH Generating Requirements File Python 3.10.6 pip 24.1 from /tmp/venv-SU5Q/lib/python3.10/site-packages/pip (python 3.10) appdirs==1.4.4 argcomplete==3.4.0 aspy.yaml==1.3.0 attrs==23.2.0 autopage==0.5.2 beautifulsoup4==4.12.3 boto3==1.34.133 botocore==1.34.133 bs4==0.0.2 cachetools==5.3.3 certifi==2024.6.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 charset-normalizer==3.3.2 click==8.1.7 cliff==4.7.0 cmd2==2.4.3 cryptography==3.3.2 debtcollector==3.0.0 decorator==5.1.1 defusedxml==0.7.1 Deprecated==1.2.14 distlib==0.3.8 dnspython==2.6.1 docker==4.2.2 dogpile.cache==1.3.3 email_validator==2.2.0 filelock==3.15.4 future==1.0.0 gitdb==4.0.11 GitPython==3.1.43 google-auth==2.30.0 httplib2==0.22.0 identify==2.5.36 idna==3.7 importlib-resources==1.5.0 iso8601==2.1.0 Jinja2==3.1.4 jmespath==1.0.1 jsonpatch==1.33 jsonpointer==3.0.0 jsonschema==4.22.0 jsonschema-specifications==2023.12.1 keystoneauth1==5.6.0 kubernetes==30.1.0 lftools==0.37.10 lxml==5.2.2 MarkupSafe==2.1.5 msgpack==1.0.8 multi_key_dict==2.0.3 munch==4.0.0 netaddr==1.3.0 netifaces==0.11.0 niet==1.4.2 nodeenv==1.9.1 oauth2client==4.1.3 oauthlib==3.2.2 openstacksdk==3.1.0 os-client-config==2.1.0 os-service-types==1.7.0 osc-lib==3.0.1 oslo.config==9.4.0 oslo.context==5.5.0 oslo.i18n==6.3.0 oslo.log==6.0.0 oslo.serialization==5.4.0 oslo.utils==7.1.0 packaging==24.1 pbr==6.0.0 platformdirs==4.2.2 prettytable==3.10.0 pyasn1==0.6.0 pyasn1_modules==0.4.0 pycparser==2.22 pygerrit2==2.0.15 PyGithub==2.3.0 PyJWT==2.8.0 PyNaCl==1.5.0 pyparsing==2.4.7 pyperclip==1.9.0 pyrsistent==0.20.0 python-cinderclient==9.5.0 python-dateutil==2.9.0.post0 python-heatclient==3.5.0 python-jenkins==1.8.2 python-keystoneclient==5.4.0 python-magnumclient==4.5.0 python-novaclient==18.6.0 python-openstackclient==6.6.0 python-swiftclient==4.6.0 PyYAML==6.0.1 referencing==0.35.1 requests==2.32.3 requests-oauthlib==2.0.0 requestsexceptions==1.4.0 rfc3986==2.0.0 rpds-py==0.18.1 rsa==4.9 ruamel.yaml==0.18.6 ruamel.yaml.clib==0.2.8 s3transfer==0.10.2 simplejson==3.19.2 six==1.16.0 smmap==5.0.1 soupsieve==2.5 stevedore==5.2.0 tabulate==0.9.0 toml==0.10.2 tomlkit==0.12.5 tqdm==4.66.4 typing_extensions==4.12.2 tzdata==2024.1 urllib3==1.26.19 virtualenv==20.26.3 wcwidth==0.2.13 websocket-client==1.8.0 wrapt==1.16.0 xdg==6.0.0 xmltodict==0.13.0 yq==3.4.3 [EnvInject] - Injecting environment variables from a build step. [EnvInject] - Injecting as environment variables the properties content PYTHON=python3 [EnvInject] - Variables injected successfully. [smo-ves-cli-sonar] $ /bin/bash -l /tmp/jenkins16687346999684767391.sh ---> tox-install.sh + source /home/jenkins/lf-env.sh + lf-activate-venv --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 ++ mktemp -d /tmp/venv-XXXX + lf_venv=/tmp/venv-0t3z + local venv_file=/tmp/.os_lf_venv + local python=python3 + local options + local set_path=true + local install_args= ++ getopt -o np:v: -l no-path,system-site-packages,python:,venv-file: -n lf-activate-venv -- --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 + options=' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' + eval set -- ' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' ++ set -- --venv-file /tmp/.toxenv -- tox virtualenv urllib3~=1.26.15 + true + case $1 in + venv_file=/tmp/.toxenv + shift 2 + true + case $1 in + shift + break + case $python in + local pkg_list= + [[ -d /opt/pyenv ]] + echo 'Setup pyenv:' Setup pyenv: + export PYENV_ROOT=/opt/pyenv + PYENV_ROOT=/opt/pyenv + export PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin + PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin + pyenv versions system 3.8.13 3.9.13 * 3.10.6 (set by /w/workspace/smo-ves-cli-sonar/.python-version) + command -v pyenv ++ pyenv init - --no-rehash + eval 'PATH="$(bash --norc -ec '\''IFS=:; paths=($PATH); for i in ${!paths[@]}; do if [[ ${paths[i]} == "'\''/opt/pyenv/shims'\''" ]]; then unset '\''\'\'''\''paths[i]'\''\'\'''\''; fi; done; echo "${paths[*]}"'\'')" export PATH="/opt/pyenv/shims:${PATH}" export PYENV_SHELL=bash source '\''/opt/pyenv/libexec/../completions/pyenv.bash'\'' pyenv() { local command command="${1:-}" if [ "$#" -gt 0 ]; then shift fi case "$command" in rehash|shell) eval "$(pyenv "sh-$command" "$@")" ;; *) command pyenv "$command" "$@" ;; esac }' +++ bash --norc -ec 'IFS=:; paths=($PATH); for i in ${!paths[@]}; do if [[ ${paths[i]} == "/opt/pyenv/shims" ]]; then unset '\''paths[i]'\''; fi; done; echo "${paths[*]}"' ++ PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin ++ export PATH=/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin ++ PATH=/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin ++ export PYENV_SHELL=bash ++ PYENV_SHELL=bash ++ source /opt/pyenv/libexec/../completions/pyenv.bash +++ complete -F _pyenv pyenv ++ lf-pyver python3 ++ local py_version_xy=python3 ++ local py_version_xyz= ++ pyenv versions ++ sed 's/^[ *]* //' ++ awk '{ print $1 }' ++ grep -E '^[0-9.]*[0-9]$' ++ local command ++ command=versions ++ '[' 1 -gt 0 ']' ++ shift ++ case "$command" in ++ command pyenv versions ++ pyenv versions ++ [[ ! -s /tmp/.pyenv_versions ]] +++ grep '^3' /tmp/.pyenv_versions +++ tail -n 1 +++ sort -V ++ py_version_xyz=3.10.6 ++ [[ -z 3.10.6 ]] ++ echo 3.10.6 ++ return 0 + pyenv local 3.10.6 + local command + command=local + '[' 2 -gt 0 ']' + shift + case "$command" in + command pyenv local 3.10.6 + pyenv local 3.10.6 + for arg in "$@" + case $arg in + pkg_list+='tox ' + for arg in "$@" + case $arg in + pkg_list+='virtualenv ' + for arg in "$@" + case $arg in + pkg_list+='urllib3~=1.26.15 ' + [[ -f /tmp/.toxenv ]] + [[ ! -f /tmp/.toxenv ]] + [[ -n '' ]] + python3 -m venv /tmp/venv-0t3z + echo 'lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-0t3z' lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-0t3z + echo /tmp/venv-0t3z + echo 'lf-activate-venv(): INFO: Save venv in file: /tmp/.toxenv' lf-activate-venv(): INFO: Save venv in file: /tmp/.toxenv + /tmp/venv-0t3z/bin/python3 -m pip install --upgrade --quiet pip virtualenv + [[ -z tox virtualenv urllib3~=1.26.15 ]] + echo 'lf-activate-venv(): INFO: Installing: tox virtualenv urllib3~=1.26.15 ' lf-activate-venv(): INFO: Installing: tox virtualenv urllib3~=1.26.15 + /tmp/venv-0t3z/bin/python3 -m pip install --upgrade --quiet --upgrade-strategy eager tox virtualenv urllib3~=1.26.15 + type python3 + true + echo 'lf-activate-venv(): INFO: Adding /tmp/venv-0t3z/bin to PATH' lf-activate-venv(): INFO: Adding /tmp/venv-0t3z/bin to PATH + PATH=/tmp/venv-0t3z/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin + return 0 + python3 --version Python 3.10.6 + python3 -m pip --version pip 24.1 from /tmp/venv-0t3z/lib/python3.10/site-packages/pip (python 3.10) + python3 -m pip freeze cachetools==5.3.3 chardet==5.2.0 colorama==0.4.6 distlib==0.3.8 filelock==3.15.4 packaging==24.1 platformdirs==4.2.2 pluggy==1.5.0 pyproject-api==1.7.1 tomli==2.0.1 tox==4.15.1 urllib3==1.26.19 virtualenv==20.26.3 [smo-ves-cli-sonar] $ /bin/sh -xe /tmp/jenkins11245512134675191283.sh [EnvInject] - Injecting environment variables from a build step. [EnvInject] - Injecting as environment variables the properties content PARALLEL=True [EnvInject] - Variables injected successfully. [smo-ves-cli-sonar] $ /bin/bash -l /tmp/jenkins8041968998556467786.sh ---> tox-run.sh + PATH=/home/jenkins/.local/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin + ARCHIVE_TOX_DIR=/w/workspace/smo-ves-cli-sonar/archives/tox + ARCHIVE_DOC_DIR=/w/workspace/smo-ves-cli-sonar/archives/docs + mkdir -p /w/workspace/smo-ves-cli-sonar/archives/tox + cd /w/workspace/smo-ves-cli-sonar/. + source /home/jenkins/lf-env.sh + lf-activate-venv --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 ++ mktemp -d /tmp/venv-XXXX + lf_venv=/tmp/venv-CLxl + local venv_file=/tmp/.os_lf_venv + local python=python3 + local options + local set_path=true + local install_args= ++ getopt -o np:v: -l no-path,system-site-packages,python:,venv-file: -n lf-activate-venv -- --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 + options=' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' + eval set -- ' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' ++ set -- --venv-file /tmp/.toxenv -- tox virtualenv urllib3~=1.26.15 + true + case $1 in + venv_file=/tmp/.toxenv + shift 2 + true + case $1 in + shift + break + case $python in + local pkg_list= + [[ -d /opt/pyenv ]] + echo 'Setup pyenv:' Setup pyenv: + export PYENV_ROOT=/opt/pyenv + PYENV_ROOT=/opt/pyenv + export PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin + PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin + pyenv versions system 3.8.13 3.9.13 * 3.10.6 (set by /w/workspace/smo-ves-cli-sonar/.python-version) + command -v pyenv ++ pyenv init - --no-rehash + eval 'PATH="$(bash --norc -ec '\''IFS=:; paths=($PATH); for i in ${!paths[@]}; do if [[ ${paths[i]} == "'\''/opt/pyenv/shims'\''" ]]; then unset '\''\'\'''\''paths[i]'\''\'\'''\''; fi; done; echo "${paths[*]}"'\'')" export PATH="/opt/pyenv/shims:${PATH}" export PYENV_SHELL=bash source '\''/opt/pyenv/libexec/../completions/pyenv.bash'\'' pyenv() { local command command="${1:-}" if [ "$#" -gt 0 ]; then shift fi case "$command" in rehash|shell) eval "$(pyenv "sh-$command" "$@")" ;; *) command pyenv "$command" "$@" ;; esac }' +++ bash --norc -ec 'IFS=:; paths=($PATH); for i in ${!paths[@]}; do if [[ ${paths[i]} == "/opt/pyenv/shims" ]]; then unset '\''paths[i]'\''; fi; done; echo "${paths[*]}"' ++ PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin ++ export PATH=/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin ++ PATH=/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin ++ export PYENV_SHELL=bash ++ PYENV_SHELL=bash ++ source /opt/pyenv/libexec/../completions/pyenv.bash +++ complete -F _pyenv pyenv ++ lf-pyver python3 ++ local py_version_xy=python3 ++ local py_version_xyz= ++ pyenv versions ++ local command ++ command=versions ++ grep -E '^[0-9.]*[0-9]$' ++ '[' 1 -gt 0 ']' ++ shift ++ case "$command" in ++ command pyenv versions ++ pyenv versions ++ awk '{ print $1 }' ++ sed 's/^[ *]* //' ++ [[ ! -s /tmp/.pyenv_versions ]] +++ grep '^3' /tmp/.pyenv_versions +++ tail -n 1 +++ sort -V ++ py_version_xyz=3.10.6 ++ [[ -z 3.10.6 ]] ++ echo 3.10.6 ++ return 0 + pyenv local 3.10.6 + local command + command=local + '[' 2 -gt 0 ']' + shift + case "$command" in + command pyenv local 3.10.6 + pyenv local 3.10.6 + for arg in "$@" + case $arg in + pkg_list+='tox ' + for arg in "$@" + case $arg in + pkg_list+='virtualenv ' + for arg in "$@" + case $arg in + pkg_list+='urllib3~=1.26.15 ' + [[ -f /tmp/.toxenv ]] ++ cat /tmp/.toxenv + lf_venv=/tmp/venv-0t3z + echo 'lf-activate-venv(): INFO: Reuse venv:/tmp/venv-0t3z from' file:/tmp/.toxenv lf-activate-venv(): INFO: Reuse venv:/tmp/venv-0t3z from file:/tmp/.toxenv + /tmp/venv-0t3z/bin/python3 -m pip install --upgrade --quiet pip virtualenv + [[ -z tox virtualenv urllib3~=1.26.15 ]] + echo 'lf-activate-venv(): INFO: Installing: tox virtualenv urllib3~=1.26.15 ' lf-activate-venv(): INFO: Installing: tox virtualenv urllib3~=1.26.15 + /tmp/venv-0t3z/bin/python3 -m pip install --upgrade --quiet --upgrade-strategy eager tox virtualenv urllib3~=1.26.15 + type python3 + true + echo 'lf-activate-venv(): INFO: Adding /tmp/venv-0t3z/bin to PATH' lf-activate-venv(): INFO: Adding /tmp/venv-0t3z/bin to PATH + PATH=/tmp/venv-0t3z/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin + return 0 + [[ -d /opt/pyenv ]] + echo '---> Setting up pyenv' ---> Setting up pyenv + export PYENV_ROOT=/opt/pyenv + PYENV_ROOT=/opt/pyenv + export PATH=/opt/pyenv/bin:/tmp/venv-0t3z/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin + PATH=/opt/pyenv/bin:/tmp/venv-0t3z/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin ++ pwd + PYTHONPATH=/w/workspace/smo-ves-cli-sonar + export PYTHONPATH + export TOX_TESTENV_PASSENV=PYTHONPATH + TOX_TESTENV_PASSENV=PYTHONPATH + tox --version 4.15.1 from /tmp/venv-0t3z/lib/python3.10/site-packages/tox/__init__.py + PARALLEL=True + TOX_OPTIONS_LIST= + [[ -n code,flake8 ]] + TOX_OPTIONS_LIST=' -e code,flake8' + case ${PARALLEL,,} in + TOX_OPTIONS_LIST=' -e code,flake8 --parallel auto --parallel-live' + tox -e code,flake8 --parallel auto --parallel-live + tee -a /w/workspace/smo-ves-cli-sonar/archives/tox/tox.log 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: freeze> python -m pip freeze --all flake8: pip==24.1,setuptools==70.1.0,wheel==0.43.0 flake8: OK ✔ in 1.45 seconds code: freeze> python -m pip freeze --all code: attrs==23.2.0,blinker==1.8.2,certifi==2024.6.2,charset-normalizer==3.3.2,click==8.1.7,confluent-kafka==2.4.0,coverage==7.5.4,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.1,pip==24.1,pluggy==1.5.0,pytest==8.2.2,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==70.1.0,tomli==2.0.1,urllib3==2.2.2,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.2, 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 ..............................F..F. [ 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%] =================================== FAILURES =================================== _________________________ test_check_schema_file_exist _________________________ vel_schema_path = '/w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/docs/schema' schema_ref = 'https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm' @patch("monitor.logger", logging.getLogger("monitor")) def test_check_schema_file_exist(vel_schema_path, schema_ref): > result = monitor.check_schema_file_exist(vel_schema_path, schema_ref) tests/collector/test_monitor.py:832: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ vel_schema_path = '/w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/docs/schema' schema_ref = 'https://forge.3gpp.org/rep/sa5/MnS/raw/SA88-Rel16/OpenAPI/faultMnS.yaml?inline=false' def check_schema_file_exist(vel_schema_path, schema_ref): logger.debug('in check yaml file') assert (vel_schema_path != ""), "Value of property 'schema_file' is missing in config file" # Fetching file and folder name from url schema_ref = schema_ref.split('#')[0] name_list = schema_ref.split('/') folder_name = '_'.join(name_list[2:-1]) file_name = name_list[-1] updated_vel_schema_path = vel_schema_path +'/{0}/{1}'.format(folder_name,file_name) if "https://forge.3gpp.org" in schema_ref: schema_ref = schema_ref.replace("blob","raw") schema_ref = schema_ref + '?inline=false' if not os.path.exists(updated_vel_schema_path): logger.warning('Event Listener Schema File ({0}) not found. ''No validation will be undertaken.'.format(vel_schema_path)) logger.info('Start downloading yaml file :{}'.format(schema_ref)) result = os.system('curl -JOL "{0}"'.format(schema_ref)) logger.debug("result {0}".format(result)) assert(result == 0), "Invalid URL {0}".format(schema_ref) logger.info("Download Completed") > with open(file_name, "r") as file: E FileNotFoundError: [Errno 2] No such file or directory: 'faultMnS.yaml' collector/evel-test-collector/code/collector/monitor.py:284: FileNotFoundError ----------------------------- Captured stderr call ----------------------------- % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 3054 100 3054 0 0 4013 0 --:--:-- --:--:-- --:--:-- 4018 ------------------------------ Captured log call ------------------------------- WARNING monitor:monitor.py:278 Event Listener Schema File (/w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/docs/schema) not found. No validation will be undertaken. INFO monitor:monitor.py:279 Start downloading yaml file :https://forge.3gpp.org/rep/sa5/MnS/raw/SA88-Rel16/OpenAPI/faultMnS.yaml?inline=false INFO monitor:monitor.py:283 Download Completed ______________________ test_stnd_define_event_validation _______________________ mocker_check = vel_schema_path = '/w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/docs/schema' body = {'event': {'stndDefinedFields': {'data': {'alarmId': 'lossOfSignal', 'alarmType': 'COMMUNICATIONS_ALARM', 'backUpObjec...rence': 'https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm'}}} schema_ref = 'https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm' @patch("monitor.logger", logging.getLogger("monitor")) @mock.patch("monitor.check_schema_file_exist") def test_stnd_define_event_validation(mocker_check, vel_schema_path, body, schema_ref): body = { "event": { "stndDefinedFields": { "schemaReference": schema_ref, "data": { "href": "href1", "notificationId": 0, "notificationType": "notifyNewAlarm", "eventTime": "2022-06-22T12:43:50.579315Z", "systemDN": "xyz", "alarmType": "COMMUNICATIONS_ALARM", "alarmId": "lossOfSignal", "probableCause": "lossOfSignal", "specificProblem": "lossOfSignal", "perceivedSeverity": "CRITICAL", "correlatedNotifications": [], "rootCauseIndicator": False, "backedUpStatus": True, "backUpObject": "xyz", "trendIndication": "MORE_SEVERE", }, } } } path = os.getcwd() mocker_check.return_value = os.path.join( path, "collector/evel-test-collector/docs/schema/forge.3gpp.org_rep_sa5_MnS_blob_SA88-Rel16_OpenAPI/faultMnS.yaml", ) > result = monitor.stnd_define_event_validation(vel_schema_path, body) tests/collector/test_monitor.py:931: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ schema_path = '/w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/docs/schema/forge.3gpp.org_rep_sa5_MnS_blob_SA88-Rel16_OpenAPI/faultMnS.yaml' body = {'event': {'stndDefinedFields': {'data': {'alarmId': 'lossOfSignal', 'alarmType': 'COMMUNICATIONS_ALARM', 'backUpObjec...rence': 'https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm'}}} def stnd_define_event_validation(schema_path , body): logger.debug('in second level validation ') schema_ref = body['event']['stndDefinedFields']["schemaReference"] schema_path = check_schema_file_exist(schema_path , schema_ref) logger.debug('end check yaml path ') > schema = yaml.full_load(open(schema_path, 'r')) E FileNotFoundError: [Errno 2] No such file or directory: '/w/workspace/smo-ves-cli-sonar/collector/evel-test-collector/docs/schema/forge.3gpp.org_rep_sa5_MnS_blob_SA88-Rel16_OpenAPI/faultMnS.yaml' collector/evel-test-collector/code/collector/monitor.py:307: FileNotFoundError =============================== 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 7 98% 308-314 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 22 95% 162-165, 400-403, 420-423, 460-463, 511-512, 833-834, 862, 932 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 165 93% Coverage HTML written to dir htmlcov Coverage XML written to file coverage.xml Required test coverage of 70% reached. Total coverage: 92.62% =========================== short test summary info ============================ FAILED tests/collector/test_monitor.py::test_check_schema_file_exist - FileNo... FAILED tests/collector/test_monitor.py::test_stnd_define_event_validation - F... ============ 2 failed, 110 passed, 2 skipped, 12 warnings in 5.94s ============= code: exit 1 (6.57 seconds) /w/workspace/smo-ves-cli-sonar> 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 pid=2754 code: FAIL code 1 (16.61=setup[10.04]+cmd[6.57] seconds) flake8: OK (1.45 seconds) evaluation failed :( (16.77 seconds) + tox_status=255 + echo '---> Completed tox runs' ---> Completed tox runs + for i in .tox/*/log ++ echo .tox/code/log ++ awk -F/ '{print $2}' + tox_env=code + cp -r .tox/code/log /w/workspace/smo-ves-cli-sonar/archives/tox/code + for i in .tox/*/log ++ echo .tox/flake8/log ++ awk -F/ '{print $2}' + tox_env=flake8 + cp -r .tox/flake8/log /w/workspace/smo-ves-cli-sonar/archives/tox/flake8 + DOC_DIR=docs/_build/html + [[ -d docs/_build/html ]] + echo '---> tox-run.sh ends' ---> tox-run.sh ends + test 255 -eq 0 + exit 255 ++ '[' 2 = 1 ']' Build step 'Execute shell' marked build as failure [PostBuildScript] - [INFO] Executing post build scripts. [smo-ves-cli-sonar] $ /bin/bash /tmp/jenkins1689364222287675571.sh ---> sysstat.sh [smo-ves-cli-sonar] $ /bin/bash /tmp/jenkins11296022803078716545.sh ---> package-listing.sh ++ tr '[:upper:]' '[:lower:]' ++ facter osfamily + OS_FAMILY=debian + workspace=/w/workspace/smo-ves-cli-sonar + START_PACKAGES=/tmp/packages_start.txt + END_PACKAGES=/tmp/packages_end.txt + DIFF_PACKAGES=/tmp/packages_diff.txt + PACKAGES=/tmp/packages_start.txt + '[' /w/workspace/smo-ves-cli-sonar ']' + PACKAGES=/tmp/packages_end.txt + case "${OS_FAMILY}" in + dpkg -l + grep '^ii' + '[' -f /tmp/packages_start.txt ']' + '[' -f /tmp/packages_end.txt ']' + diff /tmp/packages_start.txt /tmp/packages_end.txt + '[' /w/workspace/smo-ves-cli-sonar ']' + mkdir -p /w/workspace/smo-ves-cli-sonar/archives/ + cp -f /tmp/packages_diff.txt /tmp/packages_end.txt /tmp/packages_start.txt /w/workspace/smo-ves-cli-sonar/archives/ [smo-ves-cli-sonar] $ /bin/bash /tmp/jenkins3357993175691606430.sh ---> capture-instance-metadata.sh Setup pyenv: system 3.8.13 3.9.13 * 3.10.6 (set by /w/workspace/smo-ves-cli-sonar/.python-version) lf-activate-venv(): INFO: Reuse venv:/tmp/venv-SU5Q from file:/tmp/.os_lf_venv lf-activate-venv(): INFO: Installing: lftools lf-activate-venv(): INFO: Adding /tmp/venv-SU5Q/bin to PATH INFO: Running in OpenStack, capturing instance metadata [smo-ves-cli-sonar] $ /bin/bash /tmp/jenkins2838319179024101714.sh provisioning config files... copy managed file [jenkins-log-archives-settings] to file:/w/workspace/smo-ves-cli-sonar@tmp/config15457728324004173441tmp Regular expression run condition: Expression=[^.*logs-s3.*], Label=[] Run condition [Regular expression match] preventing perform for step [Provide Configuration files] [EnvInject] - Injecting environment variables from a build step. [EnvInject] - Injecting as environment variables the properties content SERVER_ID=logs [EnvInject] - Variables injected successfully. [smo-ves-cli-sonar] $ /bin/bash /tmp/jenkins10124973044553781654.sh ---> create-netrc.sh [smo-ves-cli-sonar] $ /bin/bash /tmp/jenkins9276238986881992235.sh ---> python-tools-install.sh Setup pyenv: system 3.8.13 3.9.13 * 3.10.6 (set by /w/workspace/smo-ves-cli-sonar/.python-version) lf-activate-venv(): INFO: Reuse venv:/tmp/venv-SU5Q from file:/tmp/.os_lf_venv lf-activate-venv(): INFO: Installing: lftools lf-activate-venv(): INFO: Adding /tmp/venv-SU5Q/bin to PATH [smo-ves-cli-sonar] $ /bin/bash /tmp/jenkins4462242126728867751.sh ---> sudo-logs.sh Archiving 'sudo' log.. [smo-ves-cli-sonar] $ /bin/bash /tmp/jenkins18364036329019041068.sh ---> job-cost.sh Setup pyenv: system 3.8.13 3.9.13 * 3.10.6 (set by /w/workspace/smo-ves-cli-sonar/.python-version) lf-activate-venv(): INFO: Reuse venv:/tmp/venv-SU5Q from file:/tmp/.os_lf_venv lf-activate-venv(): INFO: Installing: zipp==1.1.0 python-openstackclient urllib3~=1.26.15 lf-activate-venv(): INFO: Adding /tmp/venv-SU5Q/bin to PATH INFO: No Stack... INFO: Retrieving Pricing Info for: v2-highcpu-2 INFO: Archiving Costs [smo-ves-cli-sonar] $ /bin/bash -l /tmp/jenkins15304963264431178293.sh ---> logs-deploy.sh Setup pyenv: system 3.8.13 3.9.13 * 3.10.6 (set by /w/workspace/smo-ves-cli-sonar/.python-version) lf-activate-venv(): INFO: Reuse venv:/tmp/venv-SU5Q from file:/tmp/.os_lf_venv lf-activate-venv(): INFO: Installing: lftools lf-activate-venv(): INFO: Adding /tmp/venv-SU5Q/bin to PATH INFO: Nexus URL https://nexus.o-ran-sc.org path production/vex-sjc-oran-jenkins-prod-1/smo-ves-cli-sonar/650 INFO: archiving workspace using pattern(s): -p **/*.log Archives upload complete. INFO: archiving logs to Nexus ---> uname -a: Linux prd-ubuntu1804-builder-2c-2g-4582 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ---> lscpu: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 2 NUMA node(s): 1 Vendor ID: AuthenticAMD CPU family: 23 Model: 49 Model name: AMD EPYC-Rome Processor Stepping: 0 CPU MHz: 2800.022 BogoMIPS: 5600.04 Virtualization: AMD-V Hypervisor vendor: KVM Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 512K L3 cache: 16384K NUMA node0 CPU(s): 0,1 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl xtopology cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr arat npt nrip_save umip rdpid arch_capabilities ---> nproc: 2 ---> df -h: Filesystem Size Used Avail Use% Mounted on udev 984M 0 984M 0% /dev tmpfs 200M 668K 199M 1% /run /dev/vda1 20G 7.3G 12G 39% / tmpfs 997M 0 997M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 997M 0 997M 0% /sys/fs/cgroup /dev/vda15 105M 5.3M 100M 5% /boot/efi tmpfs 200M 0 200M 0% /run/user/1001 ---> free -m: total used free shared buff/cache available Mem: 1992 337 94 0 1560 1479 Swap: 1023 0 1023 ---> ip addr: 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens3: mtu 1450 qdisc fq_codel state UP group default qlen 1000 link/ether fa:16:3e:56:5b:34 brd ff:ff:ff:ff:ff:ff inet 10.32.7.249/23 brd 10.32.7.255 scope global dynamic ens3 valid_lft 86254sec preferred_lft 86254sec inet6 fe80::f816:3eff:fe56:5b34/64 scope link valid_lft forever preferred_lft forever ---> sar -b -r -n DEV: Linux 4.15.0-213-generic (prd-ubuntu1804-builder-2c-2g-4582) 06/26/24 _x86_64_ (2 CPU) 14:02:31 LINUX RESTART (2 CPU) 14:03:02 tps rtps wtps bread/s bwrtn/s 14:04:01 147.58 42.87 104.71 2757.45 14751.08 Average: 147.58 42.87 104.71 2757.45 14751.08 14:03:02 kbmemfree kbavail kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty 14:04:01 110072 1558760 1930560 94.61 60668 1472892 521492 16.88 403064 1375688 70472 Average: 110072 1558760 1930560 94.61 60668 1472892 521492 16.88 403064 1375688 70472 14:03:02 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s %ifutil 14:04:01 ens3 181.42 119.19 885.77 15.99 0.00 0.00 0.00 0.00 14:04:01 lo 1.42 1.42 0.16 0.16 0.00 0.00 0.00 0.00 Average: ens3 181.42 119.19 885.77 15.99 0.00 0.00 0.00 0.00 Average: lo 1.42 1.42 0.16 0.16 0.00 0.00 0.00 0.00 ---> sar -P ALL: Linux 4.15.0-213-generic (prd-ubuntu1804-builder-2c-2g-4582) 06/26/24 _x86_64_ (2 CPU) 14:02:31 LINUX RESTART (2 CPU) 14:03:02 CPU %user %nice %system %iowait %steal %idle 14:04:01 all 39.44 0.00 3.26 8.29 0.08 48.94 14:04:01 0 42.70 0.00 3.24 12.30 0.09 41.68 14:04:01 1 36.16 0.00 3.29 4.28 0.08 56.18 Average: all 39.44 0.00 3.26 8.29 0.08 48.94 Average: 0 42.70 0.00 3.24 12.30 0.09 41.68 Average: 1 36.16 0.00 3.29 4.28 0.08 56.18