1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Change subversion tests -- export test didn't test exporting before

This commit is contained in:
Toshio Kuratomi 2015-01-28 17:28:00 -08:00
parent 556d4f0025
commit 0eabf3bb99

View file

@ -44,7 +44,7 @@
# "Revision: 9", # "Revision: 9",
# "URL: https://github.com/jimi-c/test_role" # "URL: https://github.com/jimi-c/test_role"
# ], # ],
# "befbore": null, # "before": null,
# "changed": true, # "changed": true,
# "invocation": { # "invocation": {
# "module_args": "repo=https://github.com/jimi-c/test_role dest=~/ansible_testing/svn", # "module_args": "repo=https://github.com/jimi-c/test_role dest=~/ansible_testing/svn",
@ -65,6 +65,11 @@
subversion: repo={{ repo }} dest={{ checkout_dir }} subversion: repo={{ repo }} dest={{ checkout_dir }}
register: subverted2 register: subverted2
- name: verify on a reclone things are marked unchanged
assert:
that:
- "not subverted2.changed"
- name: check for tags - name: check for tags
stat: path={{ checkout_dir }}/tags stat: path={{ checkout_dir }}/tags
register: tags register: tags
@ -91,15 +96,28 @@
- debug: var=subverted3 - debug: var=subverted3
- name: checkout with export - name: checkout with export
subversion: repo={{ repo }} dest={{ checkout_dir }} export=True subversion: repo={{ repo }} dest={{ output_dir }}/svn-export export=True
register: subverted4 register: subverted4
- name: verify on a reclone things are marked unchanged - name: check for tags
stat: path={{ output_dir }}/svn-export/tags
register: export_tags
- name: check for trunk
stat: path={{ output_dir }}/svn-export/trunk
register: expoort_trunk
- name: check for branches
stat: path={{ output_dir }}/svn-export/branches
register: export_branches
- name: assert presence of tags/trunk/branches in export
assert: assert:
that: that:
- "not subverted4.changed" - "export_tags.stat.isdir"
- "export_trunk.stat.isdir"
- "export_branches.stat.isdir"
- "subverted4.changed"
# TBA: test for additional options or URL variants welcome # TBA: test for additional options or URL variants welcome