1. $ tox -e ansibledevel-functional -- -k 'test_command_init_role[docker]' test/functional/test_command.py
  2. ansibledevel-functional develop-inst-noop: /home/singuliere/software/molecule
  3. 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
  4. ansibledevel-functional run-test-pre: PYTHONHASHSEED='1046539346'
  5. ansibledevel-functional runtests: commands[0] | pytest -k 'test_command_init_role[docker]' test/functional/test_command.py
  6. ======================================================= test session starts =======================================================
  7. 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
  8. cachedir: .pytest_cache
  9. rootdir: /home/singuliere/software/molecule, inifile: pytest.ini
  10. 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
  11. collected 212 items / 211 deselected
  12. test/functional/test_command.py::test_command_init_role[docker] FAILED [100%]
  13. ============================================================ FAILURES =============================================================
  14. _________________________________________________ test_command_init_role[docker] __________________________________________________
  15. temp_dir = local('/tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO'), driver_name = 'docker'
  16. skip_test = None
  17. @pytest.mark.parametrize(
  18. 'driver_name', [
  19. ('azure'),
  20. ('docker'),
  21. ('ec2'),
  22. ('gce'),
  23. ('linode'),
  24. ('lxc'),
  25. ('lxd'),
  26. ('openstack'),
  27. ('vagrant'),
  28. ],
  29. indirect=[
  30. 'driver_name',
  31. ])
  32. def test_command_init_role(temp_dir, driver_name, skip_test):
  33. > pytest.helpers.init_role(temp_dir, driver_name)
  34. /home/singuliere/software/molecule/test/functional/test_command.py:299:
  35. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  36. /home/singuliere/software/molecule/test/functional/conftest.py:122: in init_role
  37. pytest.helpers.run_command(cmd)
  38. /home/singuliere/software/molecule/test/conftest.py:43: in run_command
  39. return util.run_command(cmd)
  40. /home/singuliere/software/molecule/molecule/util.py:105: in run_command
  41. return cmd(_truncate_exc=False)
  42. /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/sh.py:1427: in __call__
  43. return RunningCommand(cmd, call_args, stdin, stdout, stderr)
  44. /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/sh.py:774: in __init__
  45. self.wait()
  46. /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/sh.py:792: in wait
  47. self.handle_command_exit_code(exit_code)
  48. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  49. self = , code = 1
  50. def handle_command_exit_code(self, code):
  51. """ here we determine if we had an exception, or an error code that we
  52. weren't expecting to see. if we did, we create and raise an exception
  53. """
  54. ca = self.call_args
  55. exc_class = get_exc_exit_code_would_raise(code, ca["ok_code"],
  56. ca["piped"])
  57. if exc_class:
  58. exc = exc_class(self.ran, self.process.stdout, self.process.stderr,
  59. ca["truncate_exc"])
  60. > raise exc
  61. E sh.ErrorReturnCode_1:
  62. E
  63. E RAN: /home/singuliere/software/molecule/.tox/ansibledevel-functional/bin/molecule test --all
  64. E
  65. E STDOUT:
  66. E
  67. E
  68. E STDERR:
  69. /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/sh.py:815: ErrorReturnCode_1
  70. ------------------------------------------------------ Captured stdout call -------------------------------------------------------
  71. --> Initializing new role test-init...
  72. Initialized role in /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init successfully.
  73. --> Validating schema /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/molecule.yml.
  74. Validation completed successfully.
  75. --> Test matrix
  76. └── default
  77. ├── lint
  78. ├── destroy
  79. ├── dependency
  80. ├── syntax
  81. ├── create
  82. ├── prepare
  83. ├── converge
  84. ├── idempotence
  85. ├── side_effect
  86. ├── verify
  87. └── destroy
  88. --> Scenario: 'default'
  89. --> Action: 'lint'
  90. --> Executing Yamllint on files found in /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/...
  91. Lint completed successfully.
  92. --> Executing Flake8 on files found in /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/tests/...
  93. Lint completed successfully.
  94. --> Executing Ansible Lint on /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/playbook.yml...
  95. Lint completed successfully.
  96. --> Scenario: 'default'
  97. --> Action: 'destroy'
  98. PLAY [Destroy] *****************************************************************
  99. TASK [Destroy molecule instance(s)] ********************************************
  100. changed: [localhost] => (item=None)
  101. changed: [localhost]
  102. TASK [Wait for instance(s) deletion to complete] *******************************
  103. ok: [localhost] => (item=None)
  104. ok: [localhost]
  105. TASK [Delete docker network(s)] ************************************************
  106. PLAY RECAP *********************************************************************
  107. localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=1
  108. --> Scenario: 'default'
  109. --> Action: 'dependency'
  110. Skipping, missing the requirements file.
  111. --> Scenario: 'default'
  112. --> Action: 'syntax'
  113. playbook: /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/playbook.yml
  114. --> Scenario: 'default'
  115. --> Action: 'create'
  116. PLAY [Create] ******************************************************************
  117. TASK [Log into a Docker registry] **********************************************
  118. skipping: [localhost] => (item=None)
  119. TASK [Create Dockerfiles from image names] *************************************
  120. changed: [localhost] => (item=None)
  121. changed: [localhost]
  122. TASK [Discover local Docker images] ********************************************
  123. ok: [localhost] => (item=None)
  124. ok: [localhost]
  125. TASK [Build an Ansible compatible image] ***************************************
  126. ok: [localhost] => (item=None)
  127. ok: [localhost]
  128. TASK [Create docker network(s)] ************************************************
  129. TASK [Create molecule instance(s)] *********************************************
  130. changed: [localhost] => (item=None)
  131. changed: [localhost]
  132. TASK [Wait for instance(s) creation to complete] *******************************
  133. FAILED - RETRYING: Wait for instance(s) creation to complete (300 retries left).
  134. changed: [localhost] => (item=None)
  135. changed: [localhost]
  136. PLAY RECAP *********************************************************************
  137. localhost : ok=5 changed=3 unreachable=0 failed=0 skipped=2
  138. --> Scenario: 'default'
  139. --> Action: 'prepare'
  140. Skipping, prepare playbook not configured.
  141. --> Scenario: 'default'
  142. --> Action: 'converge'
  143. PLAY [Converge] ****************************************************************
  144. TASK [Gathering Facts] *********************************************************
  145. ok: [instance]
  146. PLAY RECAP *********************************************************************
  147. instance : ok=1 changed=0 unreachable=0 failed=0 skipped=0
  148. --> Scenario: 'default'
  149. --> Action: 'idempotence'
  150. Idempotence completed successfully.
  151. --> Scenario: 'default'
  152. --> Action: 'side_effect'
  153. Skipping, side effect playbook not configured.
  154. --> Scenario: 'default'
  155. --> Action: 'verify'
  156. --> Executing Testinfra tests found in /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default/tests/...
  157. ============================= test session starts ==============================
  158. platform linux -- Python 3.6.6, pytest-3.6.0, py-1.7.0, pluggy-0.6.0
  159. rootdir: /tmp/pytest-of-singuliere/pytest-204/test_command_init_role_docker_0/LNGUO/test-init/molecule/default, inifile:
  160. 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
  161. collected 0 items / 1 errors
  162. ==================================== ERRORS ====================================
  163. ____________________ ERROR collecting tests/test_default.py ____________________
  164. tests/test_default.py:6: in <module>
  165. os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
  166. /home/singuliere/software/molecule/.tox/ansibledevel-functional/lib/python3.6/site-packages/testinfra/utils/ansible_runner.py:153: in __init__
  167. self.cli.options = self.cli.base_parser(
  168. E AttributeError: 'PlaybookCLI' object has no attribute 'base_parser'
  169. =============================== warnings summary ===============================
  170. None
  171. Module already imported so cannot be rewritten: pytest_cov
  172. -- Docs: http://doc.pytest.org/en/latest/warnings.html
  173. !!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
  174. ===================== 1 warnings, 1 error in 0.84 seconds ======================
  175. An error occurred during the test sequence action: 'verify'. Cleaning up.
  176. --> Scenario: 'default'
  177. --> Action: 'destroy'
  178. PLAY [Destroy] *****************************************************************
  179. TASK [Destroy molecule instance(s)] ********************************************
  180. changed: [localhost] => (item=None)
  181. changed: [localhost]
  182. TASK [Wait for instance(s) deletion to complete] *******************************
  183. FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
  184. changed: [localhost] => (item=None)
  185. changed: [localhost]
  186. TASK [Delete docker network(s)] ************************************************
  187. PLAY RECAP *********************************************************************
  188. localhost : ok=2 changed=2 unreachable=0 failed=0 skipped=1
  189. ----------- coverage: platform linux, python 3.6.6-final-0 -----------
  190. Name Stmts Miss Cover Missing
  191. -------------------------------------------------------------------------
  192. molecule/__main__.py 3 3 0% 21-24
  193. molecule/command/base.py 55 31 44% 52-53, 66-80, 83-86, 94-95, 99-102, 117-127, 137-147, 151
  194. molecule/command/check.py 12 2 83% 71-72
  195. molecule/command/converge.py 14 3 79% 80-82
  196. molecule/command/create.py 24 12 50% 78-93
  197. molecule/command/dependency.py 12 2 83% 71-72
  198. molecule/command/destroy.py 25 12 52% 84-98
  199. molecule/command/idempotence.py 43 29 33% 77-91, 102-111, 121-138
  200. molecule/command/init/role.py 36 2 94% 60-62
  201. molecule/command/init/scenario.py 40 20 50% 50, 59-88
  202. molecule/command/init/template.py 30 14 53% 44, 54-74
  203. molecule/command/lint.py 14 4 71% 71-81
  204. molecule/command/list.py 16 1 94% 88
  205. molecule/command/login.py 46 25 46% 86-87, 96-103, 106-135
  206. molecule/command/prepare.py 24 11 54% 84-98
  207. molecule/command/side_effect.py 16 6 62% 74-80
  208. molecule/command/syntax.py 12 2 83% 71-72
  209. molecule/command/verify.py 12 2 83% 71-72
  210. 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
  211. molecule/dependency/ansible_galaxy.py 54 38 30% 77-80, 84-95, 101-107, 111, 120-124, 133-152, 160-163, 166, 169
  212. molecule/dependency/base.py 17 5 71% 36, 72, 76, 80, 85
  213. molecule/dependency/gilt.py 43 29 33% 68-71, 75-80, 84, 92-93, 101-119, 122, 125
  214. molecule/dependency/shell.py 36 22 39% 73-74, 80, 84, 88, 96-101, 105-118, 121
  215. molecule/driver/azure.py 33 16 52% 86, 90-92, 100, 106, 109-111, 114-131, 134-137
  216. molecule/driver/base.py 48 20 58% 68, 124, 128, 133-135, 139, 149, 158, 174-191, 194, 203, 206
  217. molecule/driver/delegated.py 53 35 34% 137, 141-149, 153, 157-159, 162-167, 170-192, 195-197, 200-203
  218. molecule/driver/docker.py 23 6 74% 148, 152, 161, 168, 171, 174
  219. molecule/driver/ec2.py 33 16 52% 86, 90-92, 100, 106, 109-111, 114-131, 134-137
  220. molecule/driver/gce.py 33 16 52% 90, 94-96, 104, 110, 113-115, 118-135, 138-141
  221. molecule/driver/linode.py 31 16 48% 94, 98-100, 108, 114, 117-119, 122-140, 143-146
  222. molecule/driver/lxc.py 21 6 71% 68, 72, 76, 80, 83, 86
  223. molecule/driver/lxd.py 21 6 71% 89, 93, 97, 101, 104, 107
  224. molecule/driver/openstack.py 33 16 52% 86, 90-92, 100, 106, 109-111, 114-131, 134-137
  225. molecule/driver/vagrant.py 40 19 52% 135, 139, 146-148, 156, 170, 173-175, 178-195, 199, 204, 208-211
  226. molecule/interpolation.py 35 20 43% 23-24, 72-73, 84-100
  227. molecule/lint/base.py 17 5 71% 36, 72, 76, 80, 85
  228. molecule/lint/yamllint.py 36 23 36% 77-79, 83, 89, 97, 105-122, 130-142
  229. molecule/migrate.py 104 104 0% 21-206
  230. molecule/model/schema_v1.py 7 7 0% 21-152
  231. molecule/model/schema_v2.py 66 40 39% 33-35, 39, 929, 937-939, 948-954, 958-963, 967-999
  232. molecule/platforms.py 7 2 71% 75, 79
  233. 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
  234. molecule/provisioner/ansible_playbook.py 38 28 26% 43-49, 58-76, 85-94, 104-105, 116
  235. molecule/provisioner/ansible_playbooks.py 40 24 40% 41, 45, 49-51, 56, 60, 64, 68, 71, 75-92, 95
  236. molecule/provisioner/base.py 16 4 75% 37, 70-72
  237. molecule/provisioner/lint/ansible_lint.py 43 31 28% 89-90, 94-102, 106-109, 118-126, 136-154
  238. molecule/provisioner/lint/base.py 17 5 71% 36, 72, 76, 80, 86
  239. 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
  240. molecule/scenarios.py 41 26 37% 45-47, 50-52, 55, 66-74, 77-90, 98-102, 111, 137
  241. molecule/state.py 46 22 52% 67-70, 74-75, 81, 85, 89, 93, 97, 101, 115-117, 120-122, 125, 133, 136, 139
  242. 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
  243. molecule/verifier/base.py 31 11 65% 81, 85, 90, 95, 101-107
  244. molecule/verifier/goss.py 34 18 47% 94, 102, 106, 109, 112-128, 136
  245. molecule/verifier/inspec.py 34 18 47% 91, 99, 103, 106, 109-125, 133
  246. molecule/verifier/lint/base.py 17 5 71% 36, 72, 76, 80, 86
  247. molecule/verifier/lint/flake8.py 39 26 33% 81-84, 88, 92, 100, 108-130, 138
  248. molecule/verifier/lint/rubocop.py 42 29 31% 81-84, 88-92, 96, 104, 112-134, 142
  249. molecule/verifier/lint/yamllint.py 39 26 33% 81-84, 88, 94, 102, 110-132, 140
  250. molecule/verifier/testinfra.py 68 47 31% 103, 111-119, 125-131, 135-138, 142-150, 159-163, 173-196, 204
  251. -------------------------------------------------------------------------
  252. TOTAL 2548 1345 47%
  253. 18 files skipped due to complete coverage.
  254. Coverage XML written to file coverage.xml
  255. ==================================================== slowest 10 test durations ====================================================
  256. 41.71s call test/functional/test_command.py::test_command_init_role[docker]
  257. 0.00s setup test/functional/test_command.py::test_command_init_role[docker]
  258. 0.00s teardown test/functional/test_command.py::test_command_init_role[docker]
  259. ============================================ 1 failed, 211 deselected in 42.50 seconds ============================================
  260. 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)
  261. _____________________________________________________________ summary _____________________________________________________________
  262. ERROR: ansibledevel-functional: commands failed