tests: Do not follow local symlinks

A symlink like

ansible -> ../..

in module_utils/network_lsr breaks the copy task with a strange error
message:

An exception occurred during task execution. To see the full traceback,
use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or
directory: ''

Avoiding following symlinks helps here. The symlink makes it easier to
import the files since the import paths include ansible as a component:

from ansible.module_utils.network_lsr.utils import Util
This commit is contained in:
Till Maas 2019-04-16 15:09:41 +02:00
parent 00a81165e8
commit eef5ea350f

View file

@ -26,6 +26,7 @@
- copy:
src: "{{ item }}"
dest: /tmp/test-unit-1/
local_follow: false
loop:
- ../library/network_connections.py
- test_network_connections.py