mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
hg: Re-enable tests (#1599)
* Update license boilerplate * Change mercurial repository links Fixes: #840 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
74fcb0335e
commit
126c397d6c
3 changed files with 23 additions and 39 deletions
|
@ -1,4 +1,3 @@
|
||||||
shippable/posix/group2
|
shippable/posix/group2
|
||||||
skip/python3
|
skip/python3
|
||||||
skip/aix
|
skip/aix
|
||||||
disabled # tests use bitbucket, which dropped mercurial support on 2020-08-26 (https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket)
|
|
||||||
|
|
|
@ -4,22 +4,9 @@
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
# test code for the hg module
|
# test code for the hg module
|
||||||
# (c) 2014, James Tanner <tanner.jc@gmail.com>
|
# Copyright: (c) 2014, James Tanner <tanner.jc@gmail.com>
|
||||||
|
|
||||||
# This file is part of Ansible
|
|
||||||
#
|
#
|
||||||
# Ansible is free software: you can redistribute it and/or modify
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Ansible is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
- name: determine if mercurial is already installed
|
- name: determine if mercurial is already installed
|
||||||
command: which hg
|
command: which hg
|
||||||
|
|
|
@ -1,27 +1,16 @@
|
||||||
# test code for the hg module
|
# test code for the hg module
|
||||||
# (c) 2018, Ansible Project
|
# Copyright: (c) 2018, Ansible Project
|
||||||
|
|
||||||
# This file is part of Ansible
|
|
||||||
#
|
#
|
||||||
# Ansible is free software: you can redistribute it and/or modify
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Ansible is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
|
|
||||||
- name: set where to extract the repo
|
- name: set where to extract the repo
|
||||||
set_fact: checkout_dir={{ output_dir }}/epdb
|
set_fact:
|
||||||
|
checkout_dir: "{{ output_dir }}/hg_project_test"
|
||||||
|
|
||||||
- name: set what repo to use
|
- name: set what repo to use
|
||||||
set_fact: repo=https://bitbucket.org/rpathsync/epdb
|
set_fact:
|
||||||
|
repo: "http://hg.pf.osdn.net/view/a/ak/akasurde/hg_project_test"
|
||||||
|
|
||||||
- name: clean out the output_dir
|
- name: clean out the output_dir
|
||||||
shell: rm -rf {{ output_dir }}/*
|
shell: rm -rf {{ output_dir }}/*
|
||||||
|
@ -30,7 +19,9 @@
|
||||||
shell: which hg
|
shell: which hg
|
||||||
|
|
||||||
- name: initial checkout
|
- name: initial checkout
|
||||||
hg: repo={{ repo }} dest={{ checkout_dir }}
|
hg:
|
||||||
|
repo: "{{ repo }}"
|
||||||
|
dest: "{{ checkout_dir }}"
|
||||||
register: hg_result
|
register: hg_result
|
||||||
|
|
||||||
- debug: var=hg_result
|
- debug: var=hg_result
|
||||||
|
@ -46,17 +37,21 @@
|
||||||
- "hg_result.changed"
|
- "hg_result.changed"
|
||||||
|
|
||||||
- name: repeated checkout
|
- name: repeated checkout
|
||||||
hg: repo={{ repo }} dest={{ checkout_dir }}
|
hg:
|
||||||
|
repo: "{{ repo }}"
|
||||||
|
dest: "{{ checkout_dir }}"
|
||||||
register: hg_result2
|
register: hg_result2
|
||||||
|
|
||||||
- debug: var=hg_result2
|
- debug: var=hg_result2
|
||||||
|
|
||||||
- name: check for tags
|
- name: check for tags
|
||||||
stat: path={{ checkout_dir }}/.hgtags
|
stat:
|
||||||
|
path: "{{ checkout_dir }}/.hgtags"
|
||||||
register: tags
|
register: tags
|
||||||
|
|
||||||
- name: check for remotes
|
- name: check for remotes
|
||||||
stat: path={{ checkout_dir }}/.hg/branch
|
stat:
|
||||||
|
path: "{{ checkout_dir }}/.hg/branch"
|
||||||
register: branches
|
register: branches
|
||||||
|
|
||||||
- debug: var=tags
|
- debug: var=tags
|
||||||
|
@ -68,13 +63,16 @@
|
||||||
- "tags.stat.isreg"
|
- "tags.stat.isreg"
|
||||||
- "branches.stat.isreg"
|
- "branches.stat.isreg"
|
||||||
|
|
||||||
- name: verify on a reclone things are marked unchanged
|
- name: verify on a re-clone things are marked unchanged
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "not hg_result2.changed"
|
- "not hg_result2.changed"
|
||||||
|
|
||||||
- name: Checkout non-existent repo clone
|
- name: Checkout non-existent repo clone
|
||||||
hg: repo=https://bitbucket.org/pyro46/pythonscript_1 clone=no update=no
|
hg:
|
||||||
|
repo: "http://hg.pf.osdn.net/view/a/ak/akasurde/hg_project_test_1"
|
||||||
|
clone: no
|
||||||
|
update: no
|
||||||
register: hg_result3
|
register: hg_result3
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue