From 0eabf3bb993e0fa0e718a0cbd23e0cc518ae56d2 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 28 Jan 2015 17:28:00 -0800 Subject: [PATCH] Change subversion tests -- export test didn't test exporting before --- .../roles/test_subversion/tasks/main.yml | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/test/integration/roles/test_subversion/tasks/main.yml b/test/integration/roles/test_subversion/tasks/main.yml index c3d741a2903..74d1113bc82 100644 --- a/test/integration/roles/test_subversion/tasks/main.yml +++ b/test/integration/roles/test_subversion/tasks/main.yml @@ -44,7 +44,7 @@ # "Revision: 9", # "URL: https://github.com/jimi-c/test_role" # ], -# "befbore": null, +# "before": null, # "changed": true, # "invocation": { # "module_args": "repo=https://github.com/jimi-c/test_role dest=~/ansible_testing/svn", @@ -59,12 +59,17 @@ - "'after' in subverted" - "subverted.after.1 == 'URL: https://github.com/jimi-c/test_role'" - "not subverted.before" - - "subverted.changed" + - "subverted.changed" - name: repeated checkout subversion: repo={{ repo }} dest={{ checkout_dir }} register: subverted2 +- name: verify on a reclone things are marked unchanged + assert: + that: + - "not subverted2.changed" + - name: check for tags stat: path={{ checkout_dir }}/tags register: tags @@ -91,15 +96,28 @@ - debug: var=subverted3 - name: checkout with export - subversion: repo={{ repo }} dest={{ checkout_dir }} export=True + subversion: repo={{ repo }} dest={{ output_dir }}/svn-export export=True 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: 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 - -