mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Integration tests for https://github.com/ansible/ansible-modules-core/pull/558
This commit is contained in:
parent
d274fea358
commit
bcb22b0e1a
1 changed files with 26 additions and 0 deletions
|
@ -386,3 +386,29 @@
|
||||||
- name: assert presence of new file in repo (i.e. working copy updated)
|
- name: assert presence of new file in repo (i.e. working copy updated)
|
||||||
assert:
|
assert:
|
||||||
that: "repo_content.stat.exists"
|
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'
|
||||||
|
|
Loading…
Reference in a new issue