This commit is contained in:
Toshio Kuratomi 2016-01-11 17:16:08 -08:00
parent d274fea358
commit bcb22b0e1a

View file

@ -386,3 +386,29 @@
- name: assert presence of new file in repo (i.e. working copy updated)
assert:
that: "repo_content.stat.exists"
# Test that checkout by branch works when the branch is not in our current repo but the sha is
- name: clear checkout_dir
file: state=absent path={{ checkout_dir }}
- name: Clone example git repo that we're going to modify
git:
repo: '{{ repo_update_url_1 }}'
dest: '{{ checkout_dir }}/repo'
- name: Clone the repo again - this is what we test
git:
repo: '{{ checkout_dir }}/repo'
dest: '{{ checkout_dir }}/checkout'
- name: Add a branch to the repo
command: git branch new-branch
args:
chdir: '{{ checkout_dir }}/repo'
- name: Checkout the new branch in the checkout
git:
repo: '{{ checkout_dir}}/repo'
version: 'new-branch'
dest: '{{ checkout_dir }}/checkout'