diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/git/tasks/formats.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-c3bc180c49b5e6182a7c66bb8b645fe013614adc.tar.xz ansible-core-c3bc180c49b5e6182a7c66bb8b645fe013614adc.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/targets/git/tasks/formats.yml')
-rw-r--r-- | test/integration/targets/git/tasks/formats.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/integration/targets/git/tasks/formats.yml b/test/integration/targets/git/tasks/formats.yml new file mode 100644 index 0000000..e5fcda7 --- /dev/null +++ b/test/integration/targets/git/tasks/formats.yml @@ -0,0 +1,40 @@ +- name: FORMATS | initial checkout + git: + repo: "{{ repo_format1 }}" + dest: "{{ repo_dir }}/format1" + register: git_result + +- name: FORMATS | verify information about the initial clone + assert: + that: + - "'before' in git_result" + - "'after' in git_result" + - "not git_result.before" + - "git_result.changed" + +- name: FORMATS | repeated checkout + git: + repo: "{{ repo_format1 }}" + dest: "{{ repo_dir }}/format1" + register: git_result2 + +- name: FORMATS | check for tags + stat: + path: "{{ repo_dir }}/format1/.git/refs/tags" + register: tags + +- name: FORMATS | check for HEAD + stat: + path: "{{ repo_dir }}/format1/.git/HEAD" + register: head + +- name: FORMATS | assert presence of tags/trunk/branches + assert: + that: + - "tags.stat.isdir" + - "head.stat.isreg" + +- name: FORMATS | verify on a reclone things are marked unchanged + assert: + that: + - "not git_result2.changed" |