(TOX) ccsdk/plugins/pgaas$ tox GLOB sdist-make: ccsdk/plugins/pgaas/setup.py py27 inst-nodeps: ccsdk/plugins/pgaas/.tox/.tmp/package/1/pgaas-1.1.0.zip py27 installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support,atomicwrites==1.3.0,attrs==19.3.0,backports.shutil-get-terminal-size==1.0.0,bottle==0.12.7,certifi==2019.9.11,chardet==3.0.4,click==4.0,click-didyoumean==0.0.3,cloudify==4.2,cloudify-dsl-parser==4.2,cloudify-plugins-common==4.2,cloudify-rest-client==4.2,cloudify-script-plugin==1.5.1,colorama==0.3.3,configparser==4.0.2,contextlib2==0.6.0.post1,coverage==4.5.4,decorator==4.4.1,ecdsa==0.14.1,Fabric==1.13.1,funcsigs==1.0.2,idna==2.8,importlib-metadata==0.23,Jinja2==2.7.2,MarkupSafe==1.1.1,more-itertools==5.0.0,networkx==1.9.1,packaging==19.2,paramiko==1.18.3,pathlib2==2.3.5,pgaas==1.1.0,pika==0.9.14,pluggy==0.13.0,prettytable==0.7.2,proxy-tools==0.1.0,psycopg2==2.8.4,py==1.8.0,pycrypto==2.6.1,pyparsing==2.4.5,pytest==4.6.6,pytest-cov==2.8.1,PyYAML==3.10,requests==2.22.0,requests-toolbelt==0.9.1,retrying==1.3.3,scandir==1.10.0,six==1.13.0,urllib3==1.25.7,virtualenv==16.7.7,wagon==0.6.1,wcwidth==0.1.7,zipp==0.6.0 py27 run-test-pre: PYTHONHASHSEED='892758248' py27 run-test: commands[0] | pytest --junitxml xunit-results.xml --cov --cov-report=xml =============================================================================================================================== test session starts =============================================================================================================================== platform linux2 -- Python 2.7.15+, pytest-4.6.6, py-1.8.0, pluggy-0.13.0 cachedir: .tox/py27/.pytest_cache rootdir: ccsdk/plugins/pgaas plugins: cov-2.8.1 collected 7 items tests/test_plugin.py ....F.. [100%] ==================================================================================================================================== FAILURES ===================================================================================================================================== ______________________________________________________________________________________________________________________________ test_update_database _______________________________________________________________________________________________________________________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7faf1bbdec10> @pytest.mark.dependency(depends=['test_add_database']) def test_update_database(monkeypatch): """ test update_database() """ try: ######################################################## # Subtle test implications regarding: update_database # # --------------------------------------------------- # # 1) update_database is a workflow and the context # # passed to it has 'nodes' attribute which is not # # not included in MockCloudifyContext # # 2) the 'nodes' attribute is a list of contexts so # # we will have to create a sub-context # # 3) update_database will iterate through each of the # # nodes contexts looking for the correct one # # 4) To identify the correct sub-context it will first# # check each sub-context for the existence of # # properties attribute # # 5) ****Mock_context internally saves properties as # # variable _properties and 'properties' is defined # # as @property...thus it is not recognized as an # # attribute...this will cause update_database to # # fail so we need to explicitly create properties # # properties attribute in the subcontext # ######################################################## #################### # Main context # #################### myctx = set_mock_context('test_update_database', monkeypatch) ########################################################### # Create subcontext and assign it to attribute properties # # in main context # ########################################################### mynode = set_mock_context('test_update_database_node', monkeypatch) # pylint: disable=protected-access mynode.properties = mynode._properties myctx.nodes = [mynode] > pgaas.pgaas_plugin.update_database(ctx=myctx, args={}) E TypeError: update_database() takes exactly 1 argument (0 given) tests/test_plugin.py:255: TypeError ------------------------------------------------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------------------------------------------------- ================ test_update_database ================ ================ test_update_database_node ================ Error: update_database() takes exactly 1 argument (0 given) Stack: Traceback (most recent call last): File "ccsdk/plugins/pgaas/tests/test_plugin.py", line 255, in test_update_database pgaas.pgaas_plugin.update_database(ctx=myctx, args={}) TypeError: update_database() takes exactly 1 argument (0 given) ================================================================================================================================ warnings summary ================================================================================================================================= .tox/py27/local/lib/python2.7/site-packages/_pytest/mark/structures.py:335 ccsdk/plugins/pgaas/.tox/py27/local/lib/python2.7/site-packages/_pytest/mark/structures.py:335: PytestUnknownMarkWarning: Unknown pytest.mark.dependency - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html PytestUnknownMarkWarning, -- Docs: https://docs.pytest.org/en/latest/warnings.html ----------------------------------------------------------------------------------------------- generated xml file: ccsdk/plugins/pgaas/xunit-results.xml ----------------------------------------------------------------------------------------------- ---------- coverage: platform linux2, python 2.7.15-final-0 ---------- Coverage XML written to file coverage.xml ================================================================================================================= 1 failed, 6 passed, 1 warnings in 7.03 seconds ================================================================================================================== ERROR: InvocationError for command ccsdk/plugins/pgaas/.tox/py27/bin/pytest --junitxml xunit-results.xml --cov --cov-report=xml (exited with code 1) py36 inst-nodeps: ccsdk/plugins/pgaas/.tox/.tmp/package/1/pgaas-1.1.0.zip py36 installed: atomicwrites==1.3.0,attrs==19.3.0,bottle==0.12.7,certifi==2019.9.11,chardet==3.0.4,cloudify-common==5.0.5.dev1,coverage==4.5.4,decorator==4.4.1,idna==2.8,importlib-metadata==0.23,Jinja2==2.10,MarkupSafe==1.1.1,more-itertools==7.2.0,networkx==1.9.1,packaging==19.2,pgaas==1.1.0,pika==0.11.2,pluggy==0.13.0,ply==3.11,proxy-tools==0.1.0,psycopg2==2.8.4,py==1.8.0,pyasn1==0.4.7,pycryptodomex==3.9.3,pyparsing==2.4.5,pysmi==0.3.4,pysnmp==4.4.5,pytest==5.2.2,pytest-cov==2.8.1,PyYAML==3.10,requests==2.22.0,requests-toolbelt==0.8.0,retrying==1.3.3,six==1.13.0,urllib3==1.25.7,wcwidth==0.1.7,zipp==0.6.0 py36 run-test-pre: PYTHONHASHSEED='892758248' py36 run-test: commands[0] | pytest --junitxml xunit-results.xml --cov --cov-report=xml =============================================================================================================================== test session starts =============================================================================================================================== platform linux -- Python 3.6.8, pytest-5.2.2, py-1.8.0, pluggy-0.13.0 cachedir: .tox/py36/.pytest_cache rootdir: ccsdk/plugins/pgaas plugins: cov-2.8.1 collected 7 items tests/test_plugin.py ....F.. [100%] ==================================================================================================================================== FAILURES ===================================================================================================================================== ______________________________________________________________________________________________________________________________ test_update_database _______________________________________________________________________________________________________________________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc091cdc710> @pytest.mark.dependency(depends=['test_add_database']) def test_update_database(monkeypatch): """ test update_database() """ try: ######################################################## # Subtle test implications regarding: update_database # # --------------------------------------------------- # # 1) update_database is a workflow and the context # # passed to it has 'nodes' attribute which is not # # not included in MockCloudifyContext # # 2) the 'nodes' attribute is a list of contexts so # # we will have to create a sub-context # # 3) update_database will iterate through each of the # # nodes contexts looking for the correct one # # 4) To identify the correct sub-context it will first# # check each sub-context for the existence of # # properties attribute # # 5) ****Mock_context internally saves properties as # # variable _properties and 'properties' is defined # # as @property...thus it is not recognized as an # # attribute...this will cause update_database to # # fail so we need to explicitly create properties # # properties attribute in the subcontext # ######################################################## #################### # Main context # #################### myctx = set_mock_context('test_update_database', monkeypatch) ########################################################### # Create subcontext and assign it to attribute properties # # in main context # ########################################################### mynode = set_mock_context('test_update_database_node', monkeypatch) # pylint: disable=protected-access mynode.properties = mynode._properties myctx.nodes = [mynode] > pgaas.pgaas_plugin.update_database(ctx=myctx, args={}) E TypeError: update_database() missing 1 required positional argument: 'refctx' tests/test_plugin.py:255: TypeError ------------------------------------------------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------------------------------------------------- ================ test_update_database ================ ================ test_update_database_node ================ Error: update_database() missing 1 required positional argument: 'refctx' Stack: Traceback (most recent call last): File "ccsdk/plugins/pgaas/tests/test_plugin.py", line 255, in test_update_database pgaas.pgaas_plugin.update_database(ctx=myctx, args={}) TypeError: update_database() missing 1 required positional argument: 'refctx' ================================================================================================================================ warnings summary ================================================================================================================================= .tox/py36/lib/python3.6/site-packages/_pytest/mark/structures.py:325 ccsdk/plugins/pgaas/.tox/py36/lib/python3.6/site-packages/_pytest/mark/structures.py:325: PytestUnknownMarkWarning: Unknown pytest.mark.dependency - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html PytestUnknownMarkWarning, tests/test_plugin.py::test_add_pgaas_cluster tests/test_plugin.py::test_add_pgaas_cluster tests/test_plugin.py::test_add_database tests/test_plugin.py::test_add_database tests/test_plugin.py::test_bad_add_database tests/test_plugin.py::test_bad_add_database tests/test_plugin.py::test_delete_database tests/test_plugin.py::test_delete_database tests/test_plugin.py::test_rm_pgaas_cluster tests/test_plugin.py::test_rm_pgaas_cluster ccsdk/plugins/pgaas/pgaas/logginginterface.py:39: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead ctx.logger.warn(msg) tests/test_plugin.py::test_bad_add_database ccsdk/plugins/pgaas/pgaas/pgaas_plugin.py:599: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead ctx.logger.warn("Error: {0}".format(e)) tests/test_plugin.py::test_bad_add_database ccsdk/plugins/pgaas/pgaas/pgaas_plugin.py:600: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead ctx.logger.warn("Stack: {0}".format(traceback.format_exc())) -- Docs: https://docs.pytest.org/en/latest/warnings.html ----------------------------------------------------------------------------------------------- generated xml file: ccsdk/plugins/pgaas/xunit-results.xml ----------------------------------------------------------------------------------------------- ----------- coverage: platform linux, python 3.6.8-final-0 ----------- Coverage XML written to file coverage.xml ==================================================================================================================== 1 failed, 6 passed, 13 warnings in 7.65s ===================================================================================================================== ERROR: InvocationError for command ccsdk/plugins/pgaas/.tox/py36/bin/pytest --junitxml xunit-results.xml --cov --cov-report=xml (exited with code 1) _____________________________________________________________________________________________________________________________________ summary _____________________________________________________________________________________________________________________________________ ERROR: py27: commands failed ERROR: py36: commands failed