Hello,

I had a look to this interesting internal test collection, yet I cannot 
make it work, my ansible-test units command keeps complaining that the 
following path cannot be found:

from ansible_collections.community.internal_test_tools.tests.unit.compat 
import unittest
from 
ansible_collections.community.internal_test_tools.tests.unit.compat.mock 
import Mock, patch

What is the procedure to follow to set it up ?

Thanks !

Cédric S.

On Sunday, February 14, 2021 at 2:17:29 PM UTC+1 Felix Fontein wrote:

> Hi,
>
> > > I'm not very happy about this either. My personal recommendation
> > > (slightly biased ;) ) for collections would be to import them from
> > > https://galaxy.ansible.com/community/internal_test_utils /
> > > https://github.com/ansible-collections/community.internal_test_tools.
> > > That of course requires you to install that collection for unit
> > > tests, though... 
> > 
> > Thanks, I've used that in my project. I wonder if a tests dependency 
> > tag is in order for galaxy.yml?
>
> good question. From how I understood it, adding things to galaxy.yml is
> complicated since it is converted to MANIFEST.json during collection
> build, and that might be strictly validated by Galaxy / AH itself.
>
> In any case, there already exists a "proposal" for a test dependency
> file: tests/requirements.yml
>
> (See for example
>
> https://github.com/ansible-collections/community.general/blob/main/tests/requirements.yml
> )
>
> This file was created by the collection migration tool used when moving
> content from ansible/ansible into collection repositories. It is not
> used by ansible-test at the moment, and I have no idea whether there
> are actual plans of supporting it eventually.
>
> (Right now, dependencies are installed 'manually' during CI:
>
> https://github.com/ansible-collections/community.general/blob/main/tests/utils/shippable/shippable.sh#L76-L89
> )
>
> Cheers,
> Felix
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/6638a449-8e5c-4b66-ac37-a618bd169108n%40googlegroups.com.

Reply via email to