Debian Codegraph @

test/integration/targets/ansible-galaxy-collection/tasks/fail_fast_resolvelib.yml

raw symbols SCIP
1 # resolvelib>=0.6.0 added an 'incompatibilities' parameter to find_matches
2 # If incompatibilities aren't removed from the viable candidates, this example causes infinite recursion
3 - name: test resolvelib removes incompatibilites in find_matches and errors quickly (prevent infinite recursion)
4 block:
5 - name: create collection dir
6 file:
7 dest: "{{ galaxy_dir }}/resolvelib/ns/coll"
8 state: directory
9
10 - name: create galaxy.yml with a dependency on a galaxy-sourced collection
11 copy:
12 dest: "{{ galaxy_dir }}/resolvelib/ns/coll/galaxy.yml"
13 content: |
14 namespace: ns
15 name: coll
16 authors:
17 - ansible-core
18 readme: README.md
19 version: "1.0.0"
20 dependencies:
21 namespace1.name1: "0.0.5"
22
23 - name: build the collection
24 command: ansible-galaxy collection build ns/coll
25 args:
26 chdir: "{{ galaxy_dir }}/resolvelib"
27
28 - name: install a conflicting version of the dep with the tarfile (expected failure)
29 command: ansible-galaxy collection install namespace1.name1:1.0.9 ns-coll-1.0.0.tar.gz -vvvvv -s {{ test_name }} -p collections/
30 args:
31 chdir: "{{ galaxy_dir }}/resolvelib"
32 timeout: 30
33 ignore_errors: yes
34 register: incompatible
35
36 - assert:
37 that:
38 - incompatible.failed
39 - not incompatible.msg is contains 'Timed out after'
40 - '"Failed to resolve the requested dependencies map" in incompatible.stderr'
41 - '"* namespace1.name1:1.0.9 (direct request)" in incompatible.stderr'
42 - '"* namespace1.name1:0.0.5 (dependency of ns.coll:1.0.0)" in incompatible.stderr'
43
44 always:
45 - name: cleanup resolvelib test
46 file:
47 dest: "{{ galaxy_dir }}/resolvelib"
48 state: absent