- $ tox -e ansibledevel-functional -- -k 'test_command_init_role[docker]' test/functional/test_command.py
- ansibledevel-functional develop-inst-noop: /home/singuliere/software/molecule
- ansibledevel-functional installed: adal==1.2.1,ansible==2.8.0.dev0,ansible-lint==4.0.1,anyconfig==0.9.7,apache-libcloud==2.4.0,apipkg==1.5,appdirs==1.4.3,applicationinsights==0.11.7,argcomplete==1.9.4,arrow==0.13.0,asn1crypto==0.24.0,atomicwrites==1.3.0,attrs==18.2.0,azure-cli-core==2.0.35,azure-cli-nspkg==3.0.2,azure-common==1.1.11,azure-graphrbac==0.40.0,azure-keyvault==1.0.0a1,azure-mgmt-batch==4.1.0,azure-mgmt-cdn==3.0.0,azure-mgmt-compute==4.4.0,azure-mgmt-containerinstance==0.4.0,azure-mgmt-containerregistry==2.0.0,azure-mgmt-containerservice==4.2.2,azure-mgmt-cosmosdb==0.5.1,azure-mgmt-devtestlabs==2.2.0,azure-mgmt-dns==2.1.0,azure-mgmt-hdinsight==0.1.0,azure-mgmt-keyvault==0.40.0,azure-mgmt-marketplaceordering==0.1.0,azure-mgmt-monitor==0.5.2,azure-mgmt-network==2.3.0,azure-mgmt-nspkg==2.0.0,azure-mgmt-rdbms==1.4.1,azure-mgmt-redis==5.0.0,azure-mgmt-resource==1.2.2,azure-mgmt-sql==0.10.0,azure-mgmt-storage==1.5.0,azure-mgmt-trafficmanager==0.50.0,azure-mgmt-web==0.32.0,azure-nspkg==2.0.0,azure-storage==0.35.1,Babel==2.6.0,bcrypt==3.1.6,binaryornot==0.4.4,bleach==3.1.0,Cerberus==1.2,certifi==2018.11.29,cffi==1.11.5,chardet==3.0.4,click==6.7,click-completion==0.3.1,cliff==2.14.0,cmd2==0.9.8,colorama==0.3.9,cookiecutter==1.6.0,coverage==4.5.2,cryptography==2.5,debtcollector==1.20.0,decorator==4.3.2,docker==3.7.0,docker-pycreds==0.4.0,docutils==0.14,dogpile.cache==0.7.1,entrypoints==0.3,execnet==1.5.0,fasteners==0.14.1,filelock==3.0.10,flake8==3.7.5,future==0.17.1,git-url-parse==1.2.0,humanfriendly==4.17,idna==2.7,iso8601==0.1.12,isodate==0.6.0,Jinja2==2.10,jinja2-time==0.2.0,jmespath==0.9.3,jsonpatch==1.23,jsonpointer==2.0,jsonschema==2.6.0,keystoneauth1==3.11.2,knack==0.3.3,MarkupSafe==1.1.0,mccabe==0.6.1,mock==2.0.0,-e git+https://github.com/ansible/molecule@65026491d657c03a8e3d7faeff86fbb80f053900#egg=molecule,monotonic==1.5,more-itertools==5.0.0,msgpack==0.6.1,msrest==0.6.1,msrestazure==0.5.0,munch==2.3.2,netaddr==0.7.19,netifaces==0.10.9,oauthlib==3.0.1,openstacksdk==0.24.0,os-client-config==1.31.2,os-service-types==1.5.0,osc-lib==1.12.0,oslo.config==6.8.0,oslo.i18n==3.23.0,oslo.serialization==2.28.1,oslo.utils==3.40.2,packaging==19.0,paramiko==2.4.2,pathspec==0.5.9,pbr==5.1.1,pexpect==4.6.0,pkginfo==1.5.0.1,pluggy==0.6.0,poyo==0.4.2,prettytable==0.7.2,psutil==5.4.6,ptyprocess==0.6.0,pur==5.2.1,py==1.7.0,pyasn1==0.4.5,pycodestyle==2.5.0,pycparser==2.19,pyflakes==2.1.0,Pygments==2.3.1,PyJWT==1.7.1,PyNaCl==1.3.0,pyOpenSSL==19.0.0,pyparsing==2.3.1,pyperclip==1.7.0,pytest==3.6.0,pytest-cov==2.6.0,pytest-forked==1.0.1,pytest-helpers-namespace==2019.1.8,pytest-mock==1.10.0,pytest-verbose-parametrize==1.4.0,pytest-xdist==1.26.0,python-dateutil==2.8.0,python-gilt==1.2.1,python-ironicclient==2.6.0,python-keystoneclient==3.18.0,python-vagrant==0.5.15,pytz==2018.9,PyYAML==3.13,readme-renderer==24.0,requests==2.21.0,requests-oauthlib==1.2.0,requests-toolbelt==0.9.1,requestsexceptions==1.4.0,rfc3986==1.2.0,sh==1.12.14,shade==1.22.2,simplejson==3.16.0,six==1.11.0,stevedore==1.30.0,tabulate==0.8.2,testinfra==1.16.0,toml==0.10.0,tox==3.7.0,tox-tags==0.1.0,tqdm==4.30.0,tree-format==0.1.2,twine==1.12.1,urllib3==1.24.1,virtualenv==16.3.0,wcwidth==0.1.7,webencodings==0.5.1,websocket-client==0.54.0,whichcraft==0.5.2,wrapt==1.11.1,yamllint==1.14.0,yapf==0.25.0
- ansibledevel-functional run-test-pre: PYTHONHASHSEED='1046539346'
- ansibledevel-functional runtests: commands[0] | pytest -k 'test_command_init_role[docker]' test/functional/test_command.py
- ======================================================= test session starts =======================================================
- platform linux -- Python 3.6.6, pytest-3.6.0, py-1.7.0, pluggy-0.6.0 -- /home/singuliere/software/molecule/.tox/ansibledevel-functional/bin/python
- cachedir: .pytest_cache
- rootdir: /home/singuliere/software/molecule, inifile: pytest.ini
- plugins: testinfra-1.16.0, xdist-1.26.0, verbose-parametrize-1.4.0, mock-1.10.0, helpers-namespace-2019.1.8, forked-1.0.1, cov-2.6.0
- collected 212 items / 211 deselected
- test/functional/test_command.py::test_command_init_role[docker] FAILED [100%]
- ============================================================ FAILURES =============================================================
- _________________________________________________ test_command_init_role[docker] __________________________________________________
- temp_dir = local('/tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO'), driver_name = 'docker'
- skip_test = None
- @pytest.mark.parametrize(
- 'driver_name', [
- ('azure'),
- ('docker'),
- ('ec2'),
- ('gce'),
- ('linode'),
- ('lxc'),
- ('lxd'),
- ('openstack'),
- ('vagrant'),
- ],
- indirect=[
- 'driver_name',
- ])
- def test_command_init_role(temp_dir, driver_name, skip_test):
- > pytest.helpers.init_role(temp_dir, driver_name)
- /home/singuliere/software/molecule/test/functional/test_command.py:299:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /home/singuliere/software/molecule/test/functional/conftest.py:122: in init_role
- pytest.helpers.run_command(cmd)
- /home/singuliere/software/molecule/test/conftest.py:43: in run_command
- return util.run_command(cmd)
- /home/singuliere/software/molecule/molecule/util.py:105: in run_command
- return cmd(_truncate_exc=False)
- /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/sh.py:1427: in __call__
- return RunningCommand(cmd, call_args, stdin, stdout, stderr)
- /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/sh.py:774: in __init__
- self.wait()
- /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/sh.py:792: in wait
- self.handle_command_exit_code(exit_code)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = , code = 1
- def handle_command_exit_code(self, code):
- """ here we determine if we had an exception, or an error code that we
- weren't expecting to see. if we did, we create and raise an exception
- """
- ca = self.call_args
- exc_class = get_exc_exit_code_would_raise(code, ca["ok_code"],
- ca["piped"])
- if exc_class:
- exc = exc_class(self.ran, self.process.stdout, self.process.stderr,
- ca["truncate_exc"])
- > raise exc
- E sh.ErrorReturnCode_1:
- E
- E RAN: /home/singuliere/software/molecule/.tox/ansibledevel-functional/bin/molecule test --all
- E
- E STDOUT:
- E
- E
- E STDERR:
- /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/sh.py:815: ErrorReturnCode_1
- ------------------------------------------------------ Captured stdout call -------------------------------------------------------
- --> Initializing new role test-init...
- Initialized role in /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init successfully.
- --> Validating schema /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/molecule.yml.
- Validation completed successfully.
- --> Test matrix
- └── default
- ├── lint
- ├── destroy
- ├── dependency
- ├── syntax
- ├── create
- ├── prepare
- ├── converge
- ├── idempotence
- ├── side_effect
- ├── verify
- └── destroy
- --> Scenario: 'default'
- --> Action: 'lint'
- --> Executing Yamllint on files found in /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/...
- Lint completed successfully.
- --> Executing Flake8 on files found in /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/tests/...
- Lint completed successfully.
- --> Executing Ansible Lint on /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/playbook.yml...
- Lint completed successfully.
- --> Scenario: 'default'
- --> Action: 'destroy'
- PLAY [Destroy] *****************************************************************
- TASK [Destroy molecule instance(s)] ********************************************
- changed: [localhost] => (item=None)
- changed: [localhost]
- TASK [Wait for instance(s) deletion to complete] *******************************
- ok: [localhost] => (item=None)
- ok: [localhost]
- TASK [Delete docker network(s)] ************************************************
- PLAY RECAP *********************************************************************
- localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=1
- --> Scenario: 'default'
- --> Action: 'dependency'
- Skipping, missing the requirements file.
- --> Scenario: 'default'
- --> Action: 'syntax'
- playbook: /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/playbook.yml
- --> Scenario: 'default'
- --> Action: 'create'
- PLAY [Create] ******************************************************************
- TASK [Log into a Docker registry] **********************************************
- skipping: [localhost] => (item=None)
- TASK [Create Dockerfiles from image names] *************************************
- changed: [localhost] => (item=None)
- changed: [localhost]
- TASK [Discover local Docker images] ********************************************
- ok: [localhost] => (item=None)
- ok: [localhost]
- TASK [Build an Ansible compatible image] ***************************************
- ok: [localhost] => (item=None)
- ok: [localhost]
- TASK [Create docker network(s)] ************************************************
- TASK [Create molecule instance(s)] *********************************************
- changed: [localhost] => (item=None)
- changed: [localhost]
- TASK [Wait for instance(s) creation to complete] *******************************
- FAILED - RETRYING: Wait for instance(s) creation to complete (300 retries left).
- changed: [localhost] => (item=None)
- changed: [localhost]
- PLAY RECAP *********************************************************************
- localhost : ok=5 changed=3 unreachable=0 failed=0 skipped=2
- --> Scenario: 'default'
- --> Action: 'prepare'
- Skipping, prepare playbook not configured.
- --> Scenario: 'default'
- --> Action: 'converge'
- PLAY [Converge] ****************************************************************
- TASK [Gathering Facts] *********************************************************
- ok: [instance]
- PLAY RECAP *********************************************************************
- instance : ok=1 changed=0 unreachable=0 failed=0 skipped=0
- --> Scenario: 'default'
- --> Action: 'idempotence'
- Idempotence completed successfully.
- --> Scenario: 'default'
- --> Action: 'side_effect'
- Skipping, side effect playbook not configured.
- --> Scenario: 'default'
- --> Action: 'verify'
- --> Executing Testinfra tests found in /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/tests/...
- ============================= test session starts ==============================
- platform linux -- Python 3.6.6, pytest-3.6.0, py-1.7.0, pluggy-0.6.0
- rootdir: /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default, inifile:
- plugins: testinfra-1.16.0, xdist-1.26.0, verbose-parametrize-1.4.0, mock-1.10.0, helpers-namespace-2019.1.8, forked-1.0.1, cov-2.6.0
- collected 0 items / 1 errors
- ==================================== ERRORS ====================================
- ____________________ ERROR collecting tests/test_default.py ____________________
- tests/test_default.py:6: in <module>
- os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
- /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/testinfra/utils/ansible_runner.py:153: in __init__
- self.cli.options = self.cli.base_parser(
- E AttributeError: 'PlaybookCLI' object has no attribute 'base_parser'
- =============================== warnings summary ===============================
- None
- Module already imported so cannot be rewritten: pytest_cov
- -- Docs: http://doc.pytest.org/en/latest/warnings.html
- !!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
- ===================== 1 warnings, 1 error in 0.84 seconds ======================
- An error occurred during the test sequence action: 'verify'. Cleaning up.
- --> Scenario: 'default'
- --> Action: 'destroy'
- PLAY [Destroy] *****************************************************************
- TASK [Destroy molecule instance(s)] ********************************************
- changed: [localhost] => (item=None)
- changed: [localhost]
- TASK [Wait for instance(s) deletion to complete] *******************************
- FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
- changed: [localhost] => (item=None)
- changed: [localhost]
- TASK [Delete docker network(s)] ************************************************
- PLAY RECAP *********************************************************************
- localhost : ok=2 changed=2 unreachable=0 failed=0 skipped=1
- ----------- coverage: platform linux, python 3.6.6-final-0 -----------
- Name Stmts Miss Cover Missing
- -------------------------------------------------------------------------
- molecule/__main__.py 3 3 0% 21-24
- molecule/command/base.py 55 31 44% 52-53, 66-80, 83-86, 94-95, 99-102, 117-127, 137-147, 151
- molecule/command/check.py 12 2 83% 71-72
- molecule/command/converge.py 14 3 79% 80-82
- molecule/command/create.py 24 12 50% 78-93
- molecule/command/dependency.py 12 2 83% 71-72
- molecule/command/destroy.py 25 12 52% 84-98
- molecule/command/idempotence.py 43 29 33% 77-91, 102-111, 121-138
- molecule/command/init/role.py 36 2 94% 60-62
- molecule/command/init/scenario.py 40 20 50% 50, 59-88
- molecule/command/init/template.py 30 14 53% 44, 54-74
- molecule/command/lint.py 14 4 71% 71-81
- molecule/command/list.py 16 1 94% 88
- molecule/command/login.py 46 25 46% 86-87, 96-103, 106-135
- molecule/command/prepare.py 24 11 54% 84-98
- molecule/command/side_effect.py 16 6 62% 74-80
- molecule/command/syntax.py 12 2 83% 71-72
- molecule/command/verify.py 12 2 83% 71-72
- molecule/config.py 209 126 40% 62-64, 101-106, 109-110, 114, 118, 122, 126, 130, 134, 138, 143-149, 154-180, 184, 188, 211-213, 218, 223-225, 230, 235, 240-246, 251, 254-270, 280, 290-293, 308-325, 328-337, 340, 449-455, 458-467, 471, 475, 503-508
- molecule/dependency/ansible_galaxy.py 54 38 30% 77-80, 84-95, 101-107, 111, 120-124, 133-152, 160-163, 166, 169
- molecule/dependency/base.py 17 5 71% 36, 72, 76, 80, 85
- molecule/dependency/gilt.py 43 29 33% 68-71, 75-80, 84, 92-93, 101-119, 122, 125
- molecule/dependency/shell.py 36 22 39% 73-74, 80, 84, 88, 96-101, 105-118, 121
- molecule/driver/azure.py 33 16 52% 86, 90-92, 100, 106, 109-111, 114-131, 134-137
- molecule/driver/base.py 48 20 58% 68, 124, 128, 133-135, 139, 149, 158, 174-191, 194, 203, 206
- molecule/driver/delegated.py 53 35 34% 137, 141-149, 153, 157-159, 162-167, 170-192, 195-197, 200-203
- molecule/driver/docker.py 23 6 74% 148, 152, 161, 168, 171, 174
- molecule/driver/ec2.py 33 16 52% 86, 90-92, 100, 106, 109-111, 114-131, 134-137
- molecule/driver/gce.py 33 16 52% 90, 94-96, 104, 110, 113-115, 118-135, 138-141
- molecule/driver/linode.py 31 16 48% 94, 98-100, 108, 114, 117-119, 122-140, 143-146
- molecule/driver/lxc.py 21 6 71% 68, 72, 76, 80, 83, 86
- molecule/driver/lxd.py 21 6 71% 89, 93, 97, 101, 104, 107
- molecule/driver/openstack.py 33 16 52% 86, 90-92, 100, 106, 109-111, 114-131, 134-137
- molecule/driver/vagrant.py 40 19 52% 135, 139, 146-148, 156, 170, 173-175, 178-195, 199, 204, 208-211
- molecule/interpolation.py 35 20 43% 23-24, 72-73, 84-100
- molecule/lint/base.py 17 5 71% 36, 72, 76, 80, 85
- molecule/lint/yamllint.py 36 23 36% 77-79, 83, 89, 97, 105-122, 130-142
- molecule/migrate.py 104 104 0% 21-206
- molecule/model/schema_v1.py 7 7 0% 21-152
- molecule/model/schema_v2.py 66 40 39% 33-35, 39, 929, 937-939, 948-954, 958-963, 967-999
- molecule/platforms.py 7 2 71% 75, 79
- molecule/provisioner/ansible.py 196 143 27% 291, 300, 319-326, 330-367, 371, 375, 381-390, 394-423, 427, 431, 435, 463-494, 498, 503, 509, 513, 518-520, 530-532, 544-549, 558-559, 568-569, 578-579, 588-589, 598-600, 609-610, 618-620, 628-633, 636, 645-671, 679-681, 689-701, 709-718, 729, 738-741, 749, 764, 767-770, 773, 776, 780, 784
- molecule/provisioner/ansible_playbook.py 38 28 26% 43-49, 58-76, 85-94, 104-105, 116
- molecule/provisioner/ansible_playbooks.py 40 24 40% 41, 45, 49-51, 56, 60, 64, 68, 71, 75-92, 95
- molecule/provisioner/base.py 16 4 75% 37, 70-72
- molecule/provisioner/lint/ansible_lint.py 43 31 28% 89-90, 94-102, 106-109, 118-126, 136-154
- molecule/provisioner/lint/base.py 17 5 71% 36, 72, 76, 80, 86
- molecule/scenario.py 58 33 43% 84-85, 89, 93, 97-103, 107, 111, 115, 119, 123, 127, 131, 135, 139, 143, 147, 151, 163-170, 178-179, 183-186
- molecule/scenarios.py 41 26 37% 45-47, 50-52, 55, 66-74, 77-90, 98-102, 111, 137
- molecule/state.py 46 22 52% 67-70, 74-75, 81, 85, 89, 93, 97, 101, 115-117, 120-122, 125, 133, 136, 139
- molecule/util.py 124 75 40% 43, 47-57, 68-79, 83, 87-88, 102-104, 109-115, 119-122, 133-136, 140, 151-154, 167, 180-181, 191-192, 204-205, 209, 213, 218-220, 224-235, 239, 243, 247-248, 254, 260-264, 299-301, 308-313
- molecule/verifier/base.py 31 11 65% 81, 85, 90, 95, 101-107
- molecule/verifier/goss.py 34 18 47% 94, 102, 106, 109, 112-128, 136
- molecule/verifier/inspec.py 34 18 47% 91, 99, 103, 106, 109-125, 133
- molecule/verifier/lint/base.py 17 5 71% 36, 72, 76, 80, 86
- molecule/verifier/lint/flake8.py 39 26 33% 81-84, 88, 92, 100, 108-130, 138
- molecule/verifier/lint/rubocop.py 42 29 31% 81-84, 88-92, 96, 104, 112-134, 142
- molecule/verifier/lint/yamllint.py 39 26 33% 81-84, 88, 94, 102, 110-132, 140
- molecule/verifier/testinfra.py 68 47 31% 103, 111-119, 125-131, 135-138, 142-150, 159-163, 173-196, 204
- -------------------------------------------------------------------------
- TOTAL 2548 1345 47%
- 18 files skipped due to complete coverage.
- Coverage XML written to file coverage.xml
- ==================================================== slowest 10 test durations ====================================================
- 41.71s call test/functional/test_command.py::test_command_init_role[docker]
- 0.00s setup test/functional/test_command.py::test_command_init_role[docker]
- 0.00s teardown test/functional/test_command.py::test_command_init_role[docker]
- ============================================ 1 failed, 211 deselected in 42.50 seconds ============================================
- ERROR: InvocationError for command '/home/singuliere/software/molecule/.tox/ansibledevel-functional/bin/pytest -k test_command_init_role[docker] test/functional/test_command.py' (exited with code 1)
- _____________________________________________________________ summary _____________________________________________________________
- ERROR: ansibledevel-functional: commands failed