Started by user Silvia Alejandra Gonzalez 21:50:06 Connecting to https://api.github.com using silviaalejandra/****** (token git) Obtained pipelines/Jenkinsfile from dfa5d1e3397250f55688ba88c311061bd59f7c83 [Pipeline] Start of Pipeline [Pipeline] node Running on Jenkins in /var/lib/jenkins/workspace/ipeline_deploy_parameter_develop [Pipeline] { [Pipeline] stage [Pipeline] { (Declarative: Checkout SCM) [Pipeline] checkout Selected Git installation does not exist. Using Default The recommended git tool is: NONE using credential Jenkins_silgonza_token_git Cloning the remote Git repository Cloning with configured refspecs honoured and without tags Cloning repository https://github.com/silviaalejandra/todo-list-aws.git > git init /var/lib/jenkins/workspace/ipeline_deploy_parameter_develop # timeout=10 Fetching upstream changes from https://github.com/silviaalejandra/todo-list-aws.git > git --version # timeout=10 > git --version # 'git version 2.17.1' using GIT_ASKPASS to set credentials token git > git fetch --no-tags --progress -- https://github.com/silviaalejandra/todo-list-aws.git +refs/heads/develop:refs/remotes/origin/develop # timeout=10 > git config remote.origin.url https://github.com/silviaalejandra/todo-list-aws.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/develop:refs/remotes/origin/develop # timeout=10 Avoid second fetch Checking out Revision dfa5d1e3397250f55688ba88c311061bd59f7c83 (develop) > git config core.sparsecheckout # timeout=10 > git checkout -f dfa5d1e3397250f55688ba88c311061bd59f7c83 # timeout=10 Commit message: "Merge pull request #7 from silviaalejandra/feature" > git rev-list --no-walk 8b174a63e464c2a4edb32840ada8bed6c88d6a40 # timeout=10 [Pipeline] } [Pipeline] // stage [Pipeline] withEnv [Pipeline] { [Pipeline] stage [Pipeline] { (controlenvironment) [Pipeline] script [Pipeline] { [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (SetUp) [Pipeline] echo Setup Virtualenv for testing [Pipeline] sh + bash pipelines/PIPELINE-FULL-staging/setup.sh + python3.7 -m venv todo-list-aws + source todo-list-aws/bin/activate ++ deactivate nondestructive ++ '[' -n '' ']' ++ '[' -n '' ']' ++ '[' -n /bin/bash -o -n '' ']' ++ hash -r ++ '[' -n '' ']' ++ unset VIRTUAL_ENV ++ '[' '!' nondestructive = nondestructive ']' ++ VIRTUAL_ENV=/var/lib/jenkins/workspace/ipeline_deploy_parameter_develop/todo-list-aws ++ export VIRTUAL_ENV ++ _OLD_VIRTUAL_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin ++ PATH=/var/lib/jenkins/workspace/ipeline_deploy_parameter_develop/todo-list-aws/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin ++ export PATH ++ '[' -n '' ']' ++ '[' -z '' ']' ++ _OLD_VIRTUAL_PS1= ++ '[' 'x(todo-list-aws) ' '!=' x ']' ++ PS1='(todo-list-aws) ' ++ export PS1 ++ '[' -n /bin/bash -o -n '' ']' ++ hash -r + python -m pip install --upgrade pip Collecting pip Using cached https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl Installing collected packages: pip Found existing installation: pip 9.0.1 Uninstalling pip-9.0.1: Successfully uninstalled pip-9.0.1 Successfully installed pip-21.3.1 + python -m pip install radon Collecting radon Using cached radon-5.1.0-py2.py3-none-any.whl (52 kB) Collecting mando<0.7,>=0.6 Using cached mando-0.6.4-py2.py3-none-any.whl (29 kB) Collecting colorama>=0.4.1 Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB) Collecting future Using cached future-0.18.2.tar.gz (829 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting six Using cached six-1.16.0-py2.py3-none-any.whl (11 kB) Using legacy 'setup.py install' for future, since package 'wheel' is not installed. Installing collected packages: six, mando, future, colorama, radon Running setup.py install for future: started Running setup.py install for future: finished with status 'done' Successfully installed colorama-0.4.4 future-0.18.2 mando-0.6.4 radon-5.1.0 six-1.16.0 + python -m pip install flake8 Collecting flake8 Using cached flake8-4.0.1-py2.py3-none-any.whl (64 kB) Collecting pyflakes<2.5.0,>=2.4.0 Using cached pyflakes-2.4.0-py2.py3-none-any.whl (69 kB) Collecting importlib-metadata<4.3 Using cached importlib_metadata-4.2.0-py3-none-any.whl (16 kB) Collecting mccabe<0.7.0,>=0.6.0 Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB) Collecting pycodestyle<2.9.0,>=2.8.0 Using cached pycodestyle-2.8.0-py2.py3-none-any.whl (42 kB) Collecting zipp>=0.5 Using cached zipp-3.7.0-py3-none-any.whl (5.3 kB) Collecting typing-extensions>=3.6.4 Using cached typing_extensions-4.0.1-py3-none-any.whl (22 kB) Installing collected packages: zipp, typing-extensions, pyflakes, pycodestyle, mccabe, importlib-metadata, flake8 Successfully installed flake8-4.0.1 importlib-metadata-4.2.0 mccabe-0.6.1 pycodestyle-2.8.0 pyflakes-2.4.0 typing-extensions-4.0.1 zipp-3.7.0 + python -m pip install flake8-polyfill Collecting flake8-polyfill Using cached flake8_polyfill-1.0.2-py2.py3-none-any.whl (7.3 kB) Requirement already satisfied: flake8 in ./todo-list-aws/lib/python3.7/site-packages (from flake8-polyfill) (4.0.1) Requirement already satisfied: pycodestyle<2.9.0,>=2.8.0 in ./todo-list-aws/lib/python3.7/site-packages (from flake8->flake8-polyfill) (2.8.0) Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in ./todo-list-aws/lib/python3.7/site-packages (from flake8->flake8-polyfill) (0.6.1) Requirement already satisfied: pyflakes<2.5.0,>=2.4.0 in ./todo-list-aws/lib/python3.7/site-packages (from flake8->flake8-polyfill) (2.4.0) Requirement already satisfied: importlib-metadata<4.3 in ./todo-list-aws/lib/python3.7/site-packages (from flake8->flake8-polyfill) (4.2.0) Requirement already satisfied: typing-extensions>=3.6.4 in ./todo-list-aws/lib/python3.7/site-packages (from importlib-metadata<4.3->flake8->flake8-polyfill) (4.0.1) Requirement already satisfied: zipp>=0.5 in ./todo-list-aws/lib/python3.7/site-packages (from importlib-metadata<4.3->flake8->flake8-polyfill) (3.7.0) Installing collected packages: flake8-polyfill Successfully installed flake8-polyfill-1.0.2 + python -m pip install bandit Collecting bandit Using cached bandit-1.7.1-py3-none-any.whl (113 kB) Collecting stevedore>=1.20.0 Using cached stevedore-3.5.0-py3-none-any.whl (49 kB) Collecting PyYAML>=5.3.1 Using cached PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (596 kB) Collecting GitPython>=1.0.1 Using cached GitPython-3.1.26-py3-none-any.whl (180 kB) Collecting gitdb<5,>=4.0.1 Using cached gitdb-4.0.9-py3-none-any.whl (63 kB) Requirement already satisfied: typing-extensions>=3.7.4.3 in ./todo-list-aws/lib/python3.7/site-packages (from GitPython>=1.0.1->bandit) (4.0.1) Collecting pbr!=2.1.0,>=2.0.0 Using cached pbr-5.8.0-py2.py3-none-any.whl (112 kB) Requirement already satisfied: importlib-metadata>=1.7.0 in ./todo-list-aws/lib/python3.7/site-packages (from stevedore>=1.20.0->bandit) (4.2.0) Collecting smmap<6,>=3.0.1 Using cached smmap-5.0.0-py3-none-any.whl (24 kB) Requirement already satisfied: zipp>=0.5 in ./todo-list-aws/lib/python3.7/site-packages (from importlib-metadata>=1.7.0->stevedore>=1.20.0->bandit) (3.7.0) Installing collected packages: smmap, pbr, gitdb, stevedore, PyYAML, GitPython, bandit Successfully installed GitPython-3.1.26 PyYAML-6.0 bandit-1.7.1 gitdb-4.0.9 pbr-5.8.0 smmap-5.0.0 stevedore-3.5.0 + python -m pip install pytest Collecting pytest Using cached pytest-6.2.5-py3-none-any.whl (280 kB) Collecting pluggy<2.0,>=0.12 Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB) Collecting iniconfig Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB) Collecting toml Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB) Collecting py>=1.8.2 Using cached py-1.11.0-py2.py3-none-any.whl (98 kB) Collecting attrs>=19.2.0 Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB) Collecting packaging Using cached packaging-21.3-py3-none-any.whl (40 kB) Requirement already satisfied: importlib-metadata>=0.12 in ./todo-list-aws/lib/python3.7/site-packages (from pytest) (4.2.0) Requirement already satisfied: zipp>=0.5 in ./todo-list-aws/lib/python3.7/site-packages (from importlib-metadata>=0.12->pytest) (3.7.0) Requirement already satisfied: typing-extensions>=3.6.4 in ./todo-list-aws/lib/python3.7/site-packages (from importlib-metadata>=0.12->pytest) (4.0.1) Collecting pyparsing!=3.0.5,>=2.0.2 Using cached pyparsing-3.0.6-py3-none-any.whl (97 kB) Installing collected packages: pyparsing, toml, py, pluggy, packaging, iniconfig, attrs, pytest Successfully installed attrs-21.4.0 iniconfig-1.1.1 packaging-21.3 pluggy-1.0.0 py-1.11.0 pyparsing-3.0.6 pytest-6.2.5 toml-0.10.2 + python -m pip install boto3 Collecting boto3 Using cached boto3-1.20.38-py3-none-any.whl (131 kB) Collecting s3transfer<0.6.0,>=0.5.0 Using cached s3transfer-0.5.0-py3-none-any.whl (79 kB) Collecting botocore<1.24.0,>=1.23.38 Using cached botocore-1.23.38-py3-none-any.whl (8.5 MB) Collecting jmespath<1.0.0,>=0.7.1 Using cached jmespath-0.10.0-py2.py3-none-any.whl (24 kB) Collecting python-dateutil<3.0.0,>=2.1 Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) Collecting urllib3<1.27,>=1.25.4 Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB) Requirement already satisfied: six>=1.5 in ./todo-list-aws/lib/python3.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.24.0,>=1.23.38->boto3) (1.16.0) Installing collected packages: urllib3, python-dateutil, jmespath, botocore, s3transfer, boto3 Successfully installed boto3-1.20.38 botocore-1.23.38 jmespath-0.10.0 python-dateutil-2.8.2 s3transfer-0.5.0 urllib3-1.26.8 + python -m pip install moto Collecting moto Using cached moto-2.3.2-py2.py3-none-any.whl (1.5 MB) Requirement already satisfied: botocore>=1.12.201 in ./todo-list-aws/lib/python3.7/site-packages (from moto) (1.23.38) Collecting pytz Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB) Collecting MarkupSafe!=2.0.0a1 Using cached MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (31 kB) Collecting werkzeug Using cached Werkzeug-2.0.2-py3-none-any.whl (288 kB) Collecting requests>=2.5 Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB) Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./todo-list-aws/lib/python3.7/site-packages (from moto) (2.8.2) Requirement already satisfied: boto3>=1.9.201 in ./todo-list-aws/lib/python3.7/site-packages (from moto) (1.20.38) Requirement already satisfied: importlib-metadata in ./todo-list-aws/lib/python3.7/site-packages (from moto) (4.2.0) Collecting responses>=0.9.0 Using cached responses-0.17.0-py2.py3-none-any.whl (38 kB) Collecting cryptography>=3.3.1 Using cached cryptography-36.0.1-cp36-abi3-manylinux_2_24_x86_64.whl (3.6 MB) Collecting Jinja2>=2.10.1 Using cached Jinja2-3.0.3-py3-none-any.whl (133 kB) Collecting xmltodict Using cached xmltodict-0.12.0-py2.py3-none-any.whl (9.2 kB) Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in ./todo-list-aws/lib/python3.7/site-packages (from boto3>=1.9.201->moto) (0.10.0) Requirement already satisfied: s3transfer<0.6.0,>=0.5.0 in ./todo-list-aws/lib/python3.7/site-packages (from boto3>=1.9.201->moto) (0.5.0) Requirement already satisfied: urllib3<1.27,>=1.25.4 in ./todo-list-aws/lib/python3.7/site-packages (from botocore>=1.12.201->moto) (1.26.8) Collecting cffi>=1.12 Using cached cffi-1.15.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (427 kB) Requirement already satisfied: six>=1.5 in ./todo-list-aws/lib/python3.7/site-packages (from python-dateutil<3.0.0,>=2.1->moto) (1.16.0) Collecting idna<4,>=2.5 Using cached idna-3.3-py3-none-any.whl (61 kB) Collecting charset-normalizer~=2.0.0 Using cached charset_normalizer-2.0.10-py3-none-any.whl (39 kB) Collecting certifi>=2017.4.17 Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB) Requirement already satisfied: zipp>=0.5 in ./todo-list-aws/lib/python3.7/site-packages (from importlib-metadata->moto) (3.7.0) Requirement already satisfied: typing-extensions>=3.6.4 in ./todo-list-aws/lib/python3.7/site-packages (from importlib-metadata->moto) (4.0.1) Collecting pycparser Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB) Installing collected packages: pycparser, idna, charset-normalizer, certifi, requests, MarkupSafe, cffi, xmltodict, werkzeug, responses, pytz, Jinja2, cryptography, moto Successfully installed Jinja2-3.0.3 MarkupSafe-2.0.1 certifi-2021.10.8 cffi-1.15.0 charset-normalizer-2.0.10 cryptography-36.0.1 idna-3.3 moto-2.3.2 pycparser-2.21 pytz-2021.3 requests-2.27.1 responses-0.17.0 werkzeug-2.0.2 xmltodict-0.12.0 + python -m pip install mock==4.0.2 Collecting mock==4.0.2 Using cached mock-4.0.2-py3-none-any.whl (28 kB) Installing collected packages: mock Successfully installed mock-4.0.2 + python -m pip install coverage==4.5.4 Collecting coverage==4.5.4 Using cached coverage-4.5.4-cp37-cp37m-manylinux1_x86_64.whl (205 kB) Installing collected packages: coverage Successfully installed coverage-4.5.4 + pwd /var/lib/jenkins/workspace/ipeline_deploy_parameter_develop [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Test) [Pipeline] echo Static program analysis: [Pipeline] sh + bash pipelines/PIPELINE-FULL-staging/static_test.sh ++ wc -l ++ radon cc src -nc + RAD_ERRORS=0 + [[ 0 -ne 0 ]] ++ radon mi src -nc ++ wc -l + RAD_ERRORS=0 + [[ 0 -ne 0 ]] + flake8 src/__init__.py src/create.py src/decimalencoder.py src/delete.py src/get.py src/list.py src/todoList.py src/update.py + [[ 0 -ne 0 ]] + bandit src/__init__.py src/create.py src/decimalencoder.py src/delete.py src/get.py src/list.py src/todoList.py src/update.py [main] INFO profile include tests: None [main] INFO profile exclude tests: None [main] INFO cli include tests: None [main] INFO cli exclude tests: None [main] INFO running on Python 3.7.5 Run started:2022-01-18 21:50:29.222732 Test results: No issues identified. Code scanned: Total lines of code: 194 Total lines skipped (#nosec): 0 Run metrics: Total issues (by severity): Undefined: 0.0 Low: 0.0 Medium: 0.0 High: 0.0 Total issues (by confidence): Undefined: 0.0 Low: 0.0 Medium: 0.0 High: 0.0 Files skipped (0): + [[ 0 -ne 0 ]] [Pipeline] echo Unit testing: [Pipeline] sh + bash pipelines/PIPELINE-FULL-staging/unit_test.sh ++ pwd + export PYTHONPATH=:/var/lib/jenkins/workspace/ipeline_deploy_parameter_develop + PYTHONPATH=:/var/lib/jenkins/workspace/ipeline_deploy_parameter_develop + echo 'PYTHONPATH: :/var/lib/jenkins/workspace/ipeline_deploy_parameter_develop' PYTHONPATH: :/var/lib/jenkins/workspace/ipeline_deploy_parameter_develop + export DYNAMODB_TABLE=todoUnitTestsTable + DYNAMODB_TABLE=todoUnitTestsTable + python test/unit/TestToDo.py .......... ---------------------------------------------------------------------- Ran 10 tests in 0.848s OK --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_delete_todo Table name:todoUnitTestsTable Response PutItem{'statusCode': 200, 'body': '{"id": "a73e2518-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542629.7189324", "updatedAt": "1642542629.7189324"}'} Id item:a73e2518-78a8-11ec-a498-129aa2831209 Item deleted succesfully End: test_delete_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_delete_todo_error End: test_delete_todo_error --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_get_todo Table name:todoUnitTestsTable Response put_item:{'statusCode': 200, 'body': '{"id": "a73e2519-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542629.8854458", "updatedAt": "1642542629.8854458"}'} Id item:a73e2519-78a8-11ec-a498-129aa2831209 Result getItem:{'Item': {'id': 'a73e2519-78a8-11ec-a498-129aa2831209', 'text': 'Aprender DevOps y Cloud en la UNIR', 'checked': False, 'createdAt': '1642542629.8854458', 'updatedAt': '1642542629.8854458'}, 'ResponseMetadata': {'RequestId': 'FTOMNHA5OXMM71CLPIUCN8U8Z80C1CE62UM8SM5US4RTOFPDJR2X', 'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'amazon.com', 'x-amzn-requestid': 'FTOMNHA5OXMM71CLPIUCN8U8Z80C1CE62UM8SM5US4RTOFPDJR2X', 'x-amz-crc32': '246686680'}, 'RetryAttempts': 0}} Response Get:{'id': 'a73e2519-78a8-11ec-a498-129aa2831209', 'text': 'Aprender DevOps y Cloud en la UNIR', 'checked': False, 'createdAt': '1642542629.8854458', 'updatedAt': '1642542629.8854458'} End: test_get_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_get_todo_error End: test_get_todo_error --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_list_todo Table name:todoUnitTestsTable Response GetItems[{'id': 'a73e251a-78a8-11ec-a498-129aa2831209', 'text': 'Aprender DevOps y Cloud en la UNIR', 'checked': False, 'createdAt': '1642542630.089858', 'updatedAt': '1642542630.089858'}] End: test_list_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_put_todo Table name:todoUnitTestsTable Response put_item:{'statusCode': 200, 'body': '{"id": "a73e251b-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542630.1522949", "updatedAt": "1642542630.1522949"}'} End: test_put_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_put_todo_error Table name:todoUnitTestsTable Table name:todoUnitTestsTable Table name:todoUnitTestsTable Table name:todoUnitTestsTable Table name:todoUnitTestsTable Table name:todoUnitTestsTable End: test_put_todo_error --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_table_exists Table name:todoUnitTestsTable End: test_table_exists --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_update_todo Table name:todoUnitTestsTable Response PutItem{'statusCode': 200, 'body': '{"id": "a73e2522-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542630.412836", "updatedAt": "1642542630.412836"}'} Id item:a73e2522-78a8-11ec-a498-129aa2831209 Result Update Item:{'id': 'a73e2522-78a8-11ec-a498-129aa2831209', 'text': 'Aprender más cosas que DevOps y Cloud en la UNIR', 'checked': 'false', 'createdAt': '1642542630.412836', 'updatedAt': Decimal('1642542630415')} End: test_update_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: atest_update_todo_error Table name:todoUnitTestsTable Response PutItem{'statusCode': 200, 'body': '{"id": "a73e2523-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542630.480219", "updatedAt": "1642542630.480219"}'} One or more parameter values were invalid: Type mismatch for key id expected: S actual: NULL End: atest_update_todo_error --------------------- Start: tearDown Table deleted succesfully End: tearDown + pip show coverage Name: coverage Version: 4.5.4 Summary: Code coverage measurement for Python Home-page: https://github.com/nedbat/coveragepy Author: Ned Batchelder and 100 others Author-email: ned@nedbatchelder.com License: Apache 2.0 Location: /var/lib/jenkins/workspace/ipeline_deploy_parameter_develop/todo-list-aws/lib/python3.7/site-packages Requires: Required-by: + coverage run --include=src/todoList.py test/unit/TestToDo.py .......... ---------------------------------------------------------------------- Ran 10 tests in 1.024s OK --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_delete_todo Table name:todoUnitTestsTable Response PutItem{'statusCode': 200, 'body': '{"id": "a869f5c0-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542631.6932583", "updatedAt": "1642542631.6932583"}'} Id item:a869f5c0-78a8-11ec-a498-129aa2831209 Item deleted succesfully End: test_delete_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_delete_todo_error End: test_delete_todo_error --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_get_todo Table name:todoUnitTestsTable Response put_item:{'statusCode': 200, 'body': '{"id": "a869f5c1-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542631.876307", "updatedAt": "1642542631.876307"}'} Id item:a869f5c1-78a8-11ec-a498-129aa2831209 Result getItem:{'Item': {'id': 'a869f5c1-78a8-11ec-a498-129aa2831209', 'text': 'Aprender DevOps y Cloud en la UNIR', 'checked': False, 'createdAt': '1642542631.876307', 'updatedAt': '1642542631.876307'}, 'ResponseMetadata': {'RequestId': 'P31Y9R33PRIPXEF77SJLC2YKXPB12VL6SMORL0L2NW5EB9UTYFSG', 'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'amazon.com', 'x-amzn-requestid': 'P31Y9R33PRIPXEF77SJLC2YKXPB12VL6SMORL0L2NW5EB9UTYFSG', 'x-amz-crc32': '4284606626'}, 'RetryAttempts': 0}} Response Get:{'id': 'a869f5c1-78a8-11ec-a498-129aa2831209', 'text': 'Aprender DevOps y Cloud en la UNIR', 'checked': False, 'createdAt': '1642542631.876307', 'updatedAt': '1642542631.876307'} End: test_get_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_get_todo_error End: test_get_todo_error --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_list_todo Table name:todoUnitTestsTable Response GetItems[{'id': 'a869f5c2-78a8-11ec-a498-129aa2831209', 'text': 'Aprender DevOps y Cloud en la UNIR', 'checked': False, 'createdAt': '1642542632.1225216', 'updatedAt': '1642542632.1225216'}] End: test_list_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_put_todo Table name:todoUnitTestsTable Response put_item:{'statusCode': 200, 'body': '{"id": "a869f5c3-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542632.205371", "updatedAt": "1642542632.205371"}'} End: test_put_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_put_todo_error Table name:todoUnitTestsTable Table name:todoUnitTestsTable Table name:todoUnitTestsTable Table name:todoUnitTestsTable Table name:todoUnitTestsTable Table name:todoUnitTestsTable End: test_put_todo_error --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_table_exists Table name:todoUnitTestsTable End: test_table_exists --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: test_update_todo Table name:todoUnitTestsTable Response PutItem{'statusCode': 200, 'body': '{"id": "a869f5ca-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542632.5190697", "updatedAt": "1642542632.5190697"}'} Id item:a869f5ca-78a8-11ec-a498-129aa2831209 Result Update Item:{'id': 'a869f5ca-78a8-11ec-a498-129aa2831209', 'text': 'Aprender más cosas que DevOps y Cloud en la UNIR', 'checked': 'false', 'createdAt': '1642542632.5190697', 'updatedAt': Decimal('1642542632522')} End: test_update_todo --------------------- Start: tearDown Table deleted succesfully End: tearDown --------------------- Start: setUp Creating Table with name:todoUnitTestsTable End: setUp --------------------- Start: atest_update_todo_error Table name:todoUnitTestsTable Response PutItem{'statusCode': 200, 'body': '{"id": "a869f5cb-78a8-11ec-a498-129aa2831209", "text": "Aprender DevOps y Cloud en la UNIR", "checked": false, "createdAt": "1642542632.6040945", "updatedAt": "1642542632.6040945"}'} One or more parameter values were invalid: Type mismatch for key id expected: S actual: NULL End: atest_update_todo_error --------------------- Start: tearDown Table deleted succesfully End: tearDown + coverage report -m Name Stmts Miss Cover Missing ----------------------------------------------- src/todoList.py 54 6 89% 33-34, 69-70, 114-115 + coverage xml Post stage [Pipeline] script [Pipeline] { [Pipeline] publishCoverage Publishing Coverage report.... A total of 1 reports were found Report coverage diff: 0.0%. Add to CoverageResult. Group coverage diff: 0.0%. Add to CoverageResult. Package coverage diff: 0.0%. Add to CoverageResult. File coverage diff: 0.0%. Add to CoverageResult. Class coverage diff: 0.0%. Add to CoverageResult. Line coverage diff: 12.3263855%. Add to CoverageResult. [Coverage] Computing coverage delta report [Coverage] Reference build recorder is not configured [Coverage] -> No reference build defined, falling back to previous build [Coverage] -> Found reference result 'io.jenkins.plugins.coverage.CoverageAction@367639ee' [Checks API] No suitable checks publisher found. [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Build) [Pipeline] echo Package sam application: [Pipeline] sh + bash pipelines/common-steps/build.sh + sam validate --region us-east-1 2022-01-18 21:50:34 Loading policies from IAM... 2022-01-18 21:50:34 Finished loading policies from IAM. /var/lib/jenkins/workspace/ipeline_deploy_parameter_develop/template.yaml is a valid SAM Template + sam build Building codeuri: /var/lib/jenkins/workspace/ipeline_deploy_parameter_develop/src runtime: python3.7 metadata: {} architecture: x86_64 functions: ['CreateTodoFunction', 'ListTodosFunction', 'GetTodoFunction', 'UpdateTodoFunction', 'DeleteTodoFunction'] Running PythonPipBuilder:ResolveDependencies Running PythonPipBuilder:CopySource Build Succeeded Built Artifacts : .aws-sam/build Built Template : .aws-sam/build/template.yaml Commands you can use next ========================= [*] Invoke Function: sam local invoke [*] Deploy: sam deploy --guided [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy) [Pipeline] echo Initiating Deployment [Pipeline] sh + bash pipelines/common-steps/deploy.sh + du -hs CHANGELOG.md README.md coverage.xml localEnvironment.json logs pipelines pytest.ini samconfig.toml src template.yaml test todo-list-aws + sort -h 4.0K CHANGELOG.md 4.0K coverage.xml 4.0K localEnvironment.json 4.0K pytest.ini 4.0K samconfig.toml 8.0K README.md 8.0K template.yaml 32K test 48K src 64K pipelines 268K logs 150M todo-list-aws + sam deploy template.yaml --config-env staging --no-confirm-changeset --force-upload --no-fail-on-empty-changeset --no-progressbar Deploying with following values =============================== Stack name : todo-list-aws-staging Region : us-east-1 Confirm changeset : False Deployment s3 bucket : aws-sam-cli-managed-staging-samclisourcebucket-silgonza.s3unir Capabilities : ["CAPABILITY_IAM"] Parameter overrides : {"Stage": "staging"} Signing Profiles : {} Initiating deployment ===================== Waiting for changeset to be created.. No changes to deploy. Stack todo-list-aws-staging is up to date [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Integration Test after deploy) [Pipeline] script [Pipeline] { [Pipeline] sh + aws cloudformation describe-stacks --stack-name todo-list-aws-staging --query Stacks[0].Outputs[?OutputKey==`BaseUrlApi`].OutputValue --region us-east-1 --output text [Pipeline] echo https://hwfeg1t3v4.execute-api.us-east-1.amazonaws.com/Prod [Pipeline] echo Initiating Integration Tests [Pipeline] sh + bash pipelines/common-steps/integration.sh https://hwfeg1t3v4.execute-api.us-east-1.amazonaws.com/Prod + export BASE_URL=https://hwfeg1t3v4.execute-api.us-east-1.amazonaws.com/Prod + BASE_URL=https://hwfeg1t3v4.execute-api.us-east-1.amazonaws.com/Prod + pytest -s test/integration/todoApiTest.py ============================= test session starts ============================== platform linux -- Python 3.7.5, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 rootdir: /var/lib/jenkins/workspace/ipeline_deploy_parameter_develop, configfile: pytest.ini collected 5 items test/integration/todoApiTest.py --------------------------------------- Starting - integration test Add TODO Response Add Todo: {"id": "b26adeea-78a8-11ec-bfae-029348c7f89a", "text": "Integration text example", "checked": false, "createdAt": "1642542648.4828038", "updatedAt": "1642542648.4828038"} ID todo:b26adeea-78a8-11ec-bfae-029348c7f89a End - integration test Add TODO .--------------------------------------- Starting - integration test Delete TODO Response Add todo: {"id": "b2bdbc64-78a8-11ec-bfae-029348c7f89a", "text": "Integration text example - Initial", "checked": false, "createdAt": "1642542649.0259132", "updatedAt": "1642542649.0259132"} ID todo:b2bdbc64-78a8-11ec-bfae-029348c7f89a Response Delete Todo: Response Get Todo https://hwfeg1t3v4.execute-api.us-east-1.amazonaws.com/Prod/todos/b2bdbc64-78a8-11ec-bfae-029348c7f89a: End - integration test Delete TODO .--------------------------------------- Starting - integration test Get TODO Response Add Todo: {'statusCode': 200, 'body': '{"id": "b343cd2c-78a8-11ec-bfae-029348c7f89a", "text": "Integration text example - GET", "checked": false, "createdAt": "1642542649.9045014", "updatedAt": "1642542649.9045014"}'} ID todo:b343cd2c-78a8-11ec-bfae-029348c7f89a Response Get Todo: {'checked': False, 'createdAt': '1642542649.9045014', 'text': 'Integration text example - GET', 'id': 'b343cd2c-78a8-11ec-bfae-029348c7f89a', 'updatedAt': '1642542649.9045014'} End - integration test Get TODO .--------------------------------------- Starting - integration test List TODO Response Add Todo: {'statusCode': 200, 'body': '{"id": "b3c7283e-78a8-11ec-bfae-029348c7f89a", "text": "Integration text example", "checked": false, "createdAt": "1642542650.7653596", "updatedAt": "1642542650.7653596"}'} ID todo:b3c7283e-78a8-11ec-bfae-029348c7f89a Response List Todo:[{'checked': False, 'createdAt': '1642530920.9413881', 'text': 'Integration text example', 'id': '64420efc-788d-11ec-89bf-7ae710771935', 'updatedAt': '1642530920.9413881'}, {'checked': False, 'createdAt': '1642542327.304408', 'text': 'Integration text example', 'id': 'f303803e-78a7-11ec-bfae-029348c7f89a', 'updatedAt': '1642542327.304408'}, {'checked': False, 'createdAt': '1642532744.6324537', 'text': 'Integration text example', 'id': 'a348d956-7891-11ec-9ddf-1a1910cd6629', 'updatedAt': '1642532744.6324537'}, {'checked': False, 'createdAt': '1642531814.4118977', 'text': 'Integration text example', 'id': '78ced736-788f-11ec-95e9-7a95bfba8edb', 'updatedAt': '1642531814.4118977'}, {'checked': False, 'createdAt': '1642522589.1273365', 'text': 'Integration text example', 'id': 'fe24b3da-7879-11ec-9519-b66173a33371', 'updatedAt': '1642522589.1273365'}, {'checked': False, 'createdAt': '1642518413.8732564', 'text': 'Integration text example', 'id': '4576ea5a-7870-11ec-85d8-9aad717b8b03', 'updatedAt': '1642518413.8732564'}, {'checked': False, 'createdAt': '1642542650.7653596', 'text': 'Integration text example', 'id': 'b3c7283e-78a8-11ec-bfae-029348c7f89a', 'updatedAt': '1642542650.7653596'}, {'checked': False, 'createdAt': '1642520977.0047147', 'text': 'Integration text example', 'id': '3d35bd2a-7876-11ec-945d-460bbdb7e869', 'updatedAt': '1642520977.0047147'}, {'checked': False, 'createdAt': '1642520248.226649', 'text': 'Integration text example', 'id': '8ad30788-7874-11ec-9ea9-1a82652e14ed', 'updatedAt': '1642520248.226649'}, {'checked': False, 'createdAt': '1642521474.158735', 'text': 'Integration text example', 'id': '65896bea-7877-11ec-961d-665749c7dad4', 'updatedAt': '1642521474.158735'}, {'checked': False, 'createdAt': '1642521154.5125072', 'text': 'Integration text example', 'id': 'a703477c-7876-11ec-961d-665749c7dad4', 'updatedAt': '1642521154.5125072'}, {'checked': False, 'createdAt': '1642540813.5333068', 'text': 'Integration text example', 'id': '6cbc74fc-78a4-11ec-ba6d-ae56f8eb0cdc', 'updatedAt': '1642540813.5333068'}, {'checked': False, 'createdAt': '1642527495.2541265', 'text': 'Integration text example', 'id': '6a63aa0a-7885-11ec-90c8-62e80db1c234', 'updatedAt': '1642527495.2541265'}, {'checked': False, 'createdAt': '1642540124.377398', 'text': 'Integration text example', 'id': 'd1eef284-78a2-11ec-84a8-c2bf1d88f4d7', 'updatedAt': '1642540124.377398'}, {'checked': False, 'createdAt': '1642533053.3166637', 'text': 'Integration text example', 'id': '5b40b4fc-7892-11ec-bd98-aa2967754a81', 'updatedAt': '1642533053.3166637'}, {'checked': False, 'createdAt': '1642522387.6665456', 'text': 'Integration text example', 'id': '8607a6c8-7879-11ec-9519-b66173a33371', 'updatedAt': '1642522387.6665456'}, {'checked': False, 'createdAt': '1642522205.2860568', 'text': 'Integration text example', 'id': '195298ee-7879-11ec-9519-b66173a33371', 'updatedAt': '1642522205.2860568'}, {'checked': False, 'createdAt': '1642541885.9252813', 'text': 'Integration text example', 'id': 'ebe5d320-78a6-11ec-a93c-d2f14baea7f1', 'updatedAt': '1642541885.9252813'}, {'checked': False, 'createdAt': '1642528450.9992115', 'text': 'Integration text example', 'id': 'a40ecae4-7887-11ec-96a8-7e42d0e184c0', 'updatedAt': '1642528450.9992115'}, {'checked': False, 'createdAt': '1642541407.9417577', 'text': 'Integration text example', 'id': 'ceff53fe-78a5-11ec-a93c-d2f14baea7f1', 'updatedAt': '1642541407.9417577'}, {'checked': False, 'createdAt': '1642531391.4738264', 'text': 'Integration text example', 'id': '7cb79cf8-788e-11ec-9621-a2d7394ce0ea', 'updatedAt': '1642531391.4738264'}, {'checked': False, 'createdAt': '1642534772.3152728', 'text': 'Integration text example', 'id': '5bdb1462-7896-11ec-acd5-4e7abad44fdc', 'updatedAt': '1642534772.3152728'}, {'checked': False, 'createdAt': '1642527894.017352', 'text': 'Integration text example', 'id': '58121b42-7886-11ec-bf4e-aa16c90a87eb', 'updatedAt': '1642527894.017352'}, {'checked': False, 'createdAt': '1642517882.878399', 'text': 'Integration text example', 'id': '08f78996-786f-11ec-8ad8-6e33a60d9175', 'updatedAt': '1642517882.878399'}, {'checked': False, 'createdAt': '1642532066.3788357', 'text': 'Integration text example', 'id': '0efdf192-7890-11ec-b5cd-d291004d6120', 'updatedAt': '1642532066.3788357'}, {'checked': False, 'createdAt': '1642537237.7283282', 'text': 'Integration text example', 'id': '195b40f2-789c-11ec-841a-0ae6436a99c8', 'updatedAt': '1642537237.7283282'}, {'checked': False, 'createdAt': '1642532422.0984232', 'text': 'Integration text example', 'id': 'e304720e-7890-11ec-b5cd-d291004d6120', 'updatedAt': '1642532422.0984232'}, {'checked': False, 'createdAt': '1642526841.020817', 'text': 'Integration text example', 'id': 'e475479c-7883-11ec-9c3d-6a7c03e135c1', 'updatedAt': '1642526841.020817'}, {'checked': False, 'createdAt': '1642532948.4136178', 'text': 'Integration text example', 'id': '1cbf6066-7892-11ec-bd98-aa2967754a81', 'updatedAt': '1642532948.4136178'}, {'checked': False, 'createdAt': '1642529139.3810487', 'text': 'Integration text example', 'id': '3e5d8666-7889-11ec-9663-3627e4e7a524', 'updatedAt': '1642529139.3810487'}, {'checked': False, 'createdAt': '1642541618.6845932', 'text': 'Integration text example', 'id': '4ca1ccc4-78a6-11ec-a93c-d2f14baea7f1', 'updatedAt': '1642541618.6845932'}, {'checked': False, 'createdAt': '1642526431.7840946', 'text': 'Integration text example', 'id': 'f0830412-7882-11ec-a1bb-42b1f504c3d9', 'updatedAt': '1642526431.7840946'}, {'checked': False, 'createdAt': '1642531096.7706208', 'text': 'Integration text example', 'id': 'cd0f78c0-788d-11ec-9621-a2d7394ce0ea', 'updatedAt': '1642531096.7706208'}, {'checked': False, 'createdAt': '1642523133.6872613', 'text': 'Integration text example', 'id': '42b160f6-787b-11ec-a12b-3a7664638e21', 'updatedAt': '1642523133.6872613'}, {'checked': False, 'createdAt': '1642529676.2903025', 'text': 'Integration text example', 'id': '7e636090-788a-11ec-b9fb-c68ad8ab17a4', 'updatedAt': '1642529676.2903025'}, {'checked': False, 'createdAt': '1642519171.0706978', 'text': 'Integration text example', 'id': '08ca1346-7872-11ec-8841-f6f7921ebd1c', 'updatedAt': '1642519171.0706978'}] End - integration test List TODO .--------------------------------------- Starting - integration test Update TODO Response Add todo: {"id": "b425c4ca-78a8-11ec-bfae-029348c7f89a", "text": "Integration text example - Initial", "checked": false, "createdAt": "1642542651.3853996", "updatedAt": "1642542651.3853996"} ID todo:b425c4ca-78a8-11ec-bfae-029348c7f89a Response Update todo: {'checked': 'true', 'createdAt': '1642542651.3853996', 'text': 'Integration text example - Modified', 'id': 'b425c4ca-78a8-11ec-bfae-029348c7f89a', 'updatedAt': 1642542651697} Response Get Todo: {'checked': 'true', 'createdAt': '1642542651.3853996', 'text': 'Integration text example - Modified', 'id': 'b425c4ca-78a8-11ec-bfae-029348c7f89a', 'updatedAt': 1642542651697} End - integration test Update TODO . ============================== 5 passed in 4.20s =============================== [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] echo Clean env: delete dir [Pipeline] cleanWs [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Deferred wipeout is used... [WS-CLEANUP] done [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline GitHub has been notified of this commit’s build result Finished: SUCCESS