diff options
Diffstat (limited to 'test/integration/targets/lookup_template/tasks/trim_blocks.yml')
-rw-r--r-- | test/integration/targets/lookup_template/tasks/trim_blocks.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/integration/targets/lookup_template/tasks/trim_blocks.yml b/test/integration/targets/lookup_template/tasks/trim_blocks.yml new file mode 100644 index 0000000000..b82fc0067b --- /dev/null +++ b/test/integration/targets/lookup_template/tasks/trim_blocks.yml @@ -0,0 +1,32 @@ +# VERIFY trim_blocks +- name: Render a template with "trim_blocks" set to False + copy: + content: "{{ lookup('template', 'trim_blocks.j2', trim_blocks=False) }}" + dest: "{{ output_dir }}/trim_blocks_false.templated" + register: trim_blocks_false_result + +- name: Get checksum of known good trim_blocks_false.expected + stat: + path: "{{ role_path }}/files/trim_blocks_false.expected" + register: trim_blocks_false_good + +- name: Verify templated trim_blocks_false matches known good using checksum + assert: + that: + - "trim_blocks_false_result.checksum == trim_blocks_false_good.stat.checksum" + +- name: Render a template with "trim_blocks" set to True + copy: + content: "{{ lookup('template', 'trim_blocks.j2', trim_blocks=True) }}" + dest: "{{ output_dir }}/trim_blocks_true.templated" + register: trim_blocks_true_result + +- name: Get checksum of known good trim_blocks_true.expected + stat: + path: "{{ role_path }}/files/trim_blocks_true.expected" + register: trim_blocks_true_good + +- name: Verify templated trim_blocks_true matches known good using checksum + assert: + that: + - "trim_blocks_true_result.checksum == trim_blocks_true_good.stat.checksum" |