Debian Codegraph @

test/integration/targets/ansible-galaxy-collection-scm/tasks/scm_dependency_deduplication.yml

raw
1 - name: Install all collections in a repo, one of which has a recursive dependency
2 command: 'ansible-galaxy collection install git+file://{{ scm_path }}/namespace_1/.git'
3 register: command
4
5 - assert:
6 that:
7 - command.stdout_lines | length == 12
8 - >-
9 'Starting galaxy collection install process'
10 in command.stdout_lines
11 - >-
12 'Starting collection install process'
13 in command.stdout_lines
14 - >-
15 "Installing 'namespace_1.collection_1:1.0.0' to '" +
16 install_path + "/namespace_1/collection_1'"
17 in command.stdout_lines
18 - >-
19 'Created collection for namespace_1.collection_1:1.0.0 at ' +
20 install_path + '/namespace_1/collection_1'
21 in command.stdout_lines
22 - >-
23 'namespace_1.collection_1:1.0.0 was installed successfully'
24 in command.stdout_lines
25 - >-
26 "Installing 'namespace_2.collection_2:1.0.0' to '" +
27 install_path + "/namespace_2/collection_2'"
28 in command.stdout_lines
29 - >-
30 'Created collection for namespace_2.collection_2:1.0.0 at ' +
31 install_path + '/namespace_2/collection_2'
32 in command.stdout_lines
33 - >-
34 'namespace_2.collection_2:1.0.0 was installed successfully'
35 in command.stdout_lines
36
37 - name: list installed collections
38 command: 'ansible-galaxy collection list'
39 register: installed_collections
40
41 - assert:
42 that:
43 - "'namespace_1.collection_1' in installed_collections.stdout"
44 - "'namespace_2.collection_2' in installed_collections.stdout"
45
46 - name: Install a specific collection in a repo with a recursive dependency
47 command: 'ansible-galaxy collection install git+file://{{ scm_path }}/namespace_1/.git#/collection_1/ --force-with-deps'
48 register: command
49
50 - assert:
51 that:
52 - command.stdout_lines | length == 12
53 - >-
54 'Starting galaxy collection install process'
55 in command.stdout_lines
56 - >-
57 'Starting collection install process'
58 in command.stdout_lines
59 - >-
60 "Installing 'namespace_1.collection_1:1.0.0' to '" +
61 install_path + "/namespace_1/collection_1'"
62 in command.stdout_lines
63 - >-
64 'Created collection for namespace_1.collection_1:1.0.0 at ' +
65 install_path + '/namespace_1/collection_1'
66 in command.stdout_lines
67 - >-
68 'namespace_1.collection_1:1.0.0 was installed successfully'
69 in command.stdout_lines
70 - >-
71 "Installing 'namespace_2.collection_2:1.0.0' to '" +
72 install_path + "/namespace_2/collection_2'"
73 in command.stdout_lines
74 - >-
75 'Created collection for namespace_2.collection_2:1.0.0 at ' +
76 install_path + '/namespace_2/collection_2'
77 in command.stdout_lines
78 - >-
79 'namespace_2.collection_2:1.0.0 was installed successfully'
80 in command.stdout_lines
81
82 - name: list installed collections
83 command: 'ansible-galaxy collection list'
84 register: installed_collections
85
86 - assert:
87 that:
88 - "'namespace_1.collection_1' in installed_collections.stdout"
89 - "'namespace_2.collection_2' in installed_collections.stdout"
90
91 - include_tasks: ./empty_installed_collections.yml
92 when: cleanup