test: remove ansible-examples.git repo (#81600)

* test: remove ansible-examples.git repo

* To speed up git tests remove reference to ansible-examples.git

Fixes: #81327

* Make CI green

Signed-off-by: Ansible Test Runner <noreply@example.com>
Co-authored-by: Ansible Test Runner <noreply@example.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
This commit is contained in:
Abhijeet Kasurde 2024-04-17 14:15:42 -07:00 committed by GitHub
parent 0c51a30d93
commit 8c3c694472
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 16 deletions

View File

@ -56,6 +56,16 @@
args:
chdir: "{{ repo_dir }}/shallow_branches"
- name: SETUP-LOCAL-REPOS | get ref head for test_branch
shell: git checkout test_branch && git rev-parse HEAD
args:
chdir: "{{ repo_dir }}/shallow_branches"
register: ref_head_id
- name: SETUP-LOCAL-REPOS | store ref head for test_branch
set_fact:
test_branch_ref_head_id: "{{ ref_head_id.stdout }}"
# Make this a bare one, we need to be able to push to it from clones
# We make the repo here for consistency with the other repos,
# but we finish setting it up in forcefully-fetch-tag.yml.

View File

@ -70,11 +70,11 @@
# Same as the previous test, but this time we specify which ref
# contains the SHA1
- name: SPECIFIC-REVISION | update to revision by specifying the refspec
git:
repo: https://github.com/ansible/ansible-examples.git
git: &git_ref_spec
repo: "{{ repo_dir }}/shallow_branches/.git"
dest: '{{ checkout_dir }}'
version: 5473e343e33255f2da0b160f53135c56921d875c
refspec: refs/pull/7/merge
version: "{{ test_branch_ref_head_id }}"
refspec: refs/heads/test_branch
- name: SPECIFIC-REVISION | check HEAD after update with refspec
command: git rev-parse HEAD
@ -84,7 +84,7 @@
- assert:
that:
- 'git_result.stdout == "5473e343e33255f2da0b160f53135c56921d875c"'
- 'git_result.stdout == test_branch_ref_head_id'
# try out combination of refspec and depth
- name: SPECIFIC-REVISION | clear checkout_dir
@ -94,11 +94,8 @@
- name: SPECIFIC-REVISION | update to revision by specifying the refspec with depth=1
git:
repo: https://github.com/ansible/ansible-examples.git
dest: '{{ checkout_dir }}'
version: 5473e343e33255f2da0b160f53135c56921d875c
refspec: refs/pull/7/merge
depth: 1
<<: *git_ref_spec
- name: SPECIFIC-REVISION | check HEAD after update with refspec
command: git rev-parse HEAD
@ -108,7 +105,7 @@
- assert:
that:
- 'git_result.stdout == "5473e343e33255f2da0b160f53135c56921d875c"'
- 'git_result.stdout == test_branch_ref_head_id'
- name: SPECIFIC-REVISION | try to access other commit
shell: git checkout 0ce1096
@ -130,11 +127,7 @@
path: "{{ checkout_dir }}"
- name: SPECIFIC-REVISION | clone to revision by specifying the refspec
git:
repo: https://github.com/ansible/ansible-examples.git
dest: "{{ checkout_dir }}"
version: 5473e343e33255f2da0b160f53135c56921d875c
refspec: refs/pull/7/merge
git: *git_ref_spec
- name: SPECIFIC-REVISION | check HEAD after update with refspec
command: git rev-parse HEAD
@ -144,7 +137,7 @@
- assert:
that:
- 'git_result.stdout == "5473e343e33255f2da0b160f53135c56921d875c"'
- 'git_result.stdout == test_branch_ref_head_id'
# Test that a forced shallow checkout referincing branch only always fetches latest head