Molecule: Tests failing due to network unavailability

Created on 11 Mar 2019  Â·  4Comments  Â·  Source: ansible-community/molecule

Issue Type

  • Bug report

Molecule and Ansible details

To reproduce this, try running:

 # wget -vv https://github.com/yatesr/ansible-timezone/archive/1.1.0.tar.gz
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... failed: No route to host.
Connecting to github.com (github.com)|192.30.253.112|:443... failed: No route to host.

While this worked from some machines is seems to fail from others, or it may work from the browser but from fromthe CLI.

At this moment this is needed during testing but we need to find a way to avoid this issue.

MOLECULE_DEBUG=1 tox -e functional -- -k 'test_command_check[driver/docker-docker-default]'
bug test

All 4 comments

Hmmmm, it seems test/scenarios/dependency/molecule/gilt/playbook.yml does some downloading. Maybe we should change all of these network invocations into local role installations instead. We could add a dummy role of some sort. Good catch!

Closed https://github.com/ansible/molecule/issues/1799 in favour of this. We've got network access in:

➜  molecule (cifix/remove-flaky-network-calls) ✗ g s
## cifix/remove-flaky-network-calls
 M test/scenarios/dependency/molecule/ansible-galaxy/requirements.yml
 M test/scenarios/plugins/molecule/default/gilt.yml
 M test/scenarios/side_effect/molecule/default/requirements.yml
 M test/scenarios/verifier/molecule/goss/verify.yml
 M test/scenarios/verifier/molecule/inspec/verify.yml

I'll try to remove them and then we should be getting reliable functional test builds ...

@decentral1se Very good idea! I think that we should not rely on external repositories. If we need code for testing, we can always host it in our repository.

OK, I do think https://github.com/ansible/molecule/pull/1871 is now doing a pretty good job at resolving this as much possible (compromise between still accessing network to perform good functional tests vs. not accessing network).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dfinninger picture dfinninger  Â·  5Comments

asg1612 picture asg1612  Â·  4Comments

Lirt picture Lirt  Â·  3Comments

francisco-andrade picture francisco-andrade  Â·  3Comments

surfer190 picture surfer190  Â·  3Comments