blob: 5f37c7237e7880dbd3c22977b2c0511ce7cb720e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
- name: Create test collection dir
script: make_collection_dir.py "{{ output_dir }}/test_manifest_collection"
args:
executable: '{{ ansible_facts.python.executable }}'
- name: Copy galaxy.yml with manifest_directives_full
copy:
src: galaxy.yml
dest: '{{ output_dir }}/test_manifest_collection/galaxy.yml'
- name: Build collection
command: ansible-galaxy collection build --output-path {{ output_dir|quote }} -vvv
args:
chdir: '{{ output_dir }}/test_manifest_collection'
- name: Get artifact contents
command: tar tzf '{{ output_dir }}/ns-col-1.0.0.tar.gz'
register: artifact_contents
- debug:
var: artifact_contents.stdout_lines|sort
- debug:
var: lookup('file', 'expected.txt').splitlines()|sort
- assert:
that:
- artifact_contents.stdout_lines|sort == lookup('file', 'expected.txt').splitlines()|sort
- name: Create test collection dir
script: make_collection_dir.py "{{ output_dir }}/test_manifest_no_defaults_collection"
args:
executable: '{{ ansible_facts.python.executable }}'
- name: Copy galaxy.yml with manifest_directives_full
copy:
src: full_manifest_galaxy.yml
dest: '{{ output_dir }}/test_manifest_no_defaults_collection/galaxy.yml'
- name: Build collection
command: ansible-galaxy collection build --output-path {{ output_dir|quote }} -vvv
args:
chdir: '{{ output_dir }}/test_manifest_no_defaults_collection'
- name: Get artifact contents
command: tar tzf '{{ output_dir }}/ns-col-2.0.0.tar.gz'
register: artifact_contents
- debug:
var: artifact_contents.stdout_lines|sort
- debug:
var: lookup('file', 'expected_full_manifest.txt').splitlines()|sort
- assert:
that:
- artifact_contents.stdout_lines|sort == lookup('file', 'expected_full_manifest.txt').splitlines()|sort
|