1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #6415/f0fcc91a backport][stable-4] zypper_repository: disable failing repository (#6422)

zypper_repository: disable failing repository (#6415)

* Disable failing repository from zypper_repository tests.

* Also disable repo file for >= 15.4.

* Simply disable file test for now.

(cherry picked from commit f0fcc91ac7)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2023-04-23 18:49:16 +02:00 committed by GitHub
parent 14584b261d
commit 78f6e594fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,13 +127,14 @@
repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_{{ ansible_distribution_version }}/ repo: http://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_{{ ansible_distribution_version }}/
state: absent state: absent
- name: "Test adding a repo with custom GPG key" # FIXME: this currently fails with `Repository 'Apache_PHP_Modules' is invalid.`
community.general.zypper_repository: # - name: "Test adding a repo with custom GPG key"
name: "Apache_PHP_Modules" # community.general.zypper_repository:
repo: "http://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Tumbleweed/" # name: "Apache_PHP_Modules"
priority: 100 # repo: "http://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Tumbleweed/"
auto_import_keys: true # priority: 100
state: "present" # auto_import_keys: true
# state: "present"
- name: add a repo by releasever - name: add a repo by releasever
community.general.zypper_repository: community.general.zypper_repository:
@ -208,6 +209,8 @@
- remove_repo is changed - remove_repo is changed
# For now, the URL does not work for 15.4 # For now, the URL does not work for 15.4
# FIXME: Try to get this working with newer versions
# (Maybe 'Uyuni' needs to be replaced with something else?)
- when: ansible_distribution_version is version('15.4', '<') - when: ansible_distribution_version is version('15.4', '<')
block: block:
- name: add new repository via url to .repo file - name: add new repository via url to .repo file
@ -255,24 +258,27 @@
- "removed_by_repo_file" - "removed_by_repo_file"
- "'/systemsmanagement:/Uyuni:/Stable/' not in etc_zypp_reposd.stdout" - "'/systemsmanagement:/Uyuni:/Stable/' not in etc_zypp_reposd.stdout"
- name: Copy test .repo file # FIXME: THIS DOESN'T SEEM TO WORK ANYMORE WITH ANY OPENSUSE VERSION IN CI!
copy: - when: false
src: 'files/systemsmanagement_Uyuni_Utils.repo' block:
dest: '{{ remote_tmp_dir }}' - name: Copy test .repo file
copy:
src: 'files/systemsmanagement_Uyuni_Utils.repo'
dest: '{{ remote_tmp_dir }}'
- name: add new repository via local path to .repo file - name: add new repository via local path to .repo file
community.general.zypper_repository: community.general.zypper_repository:
repo: "{{ remote_tmp_dir }}/systemsmanagement_Uyuni_Utils.repo" repo: "{{ remote_tmp_dir }}/systemsmanagement_Uyuni_Utils.repo"
state: present state: present
register: added_by_repo_local_file register: added_by_repo_local_file
- name: get repository details for systemsmanagement_Uyuni_Utils from zypper - name: get repository details for systemsmanagement_Uyuni_Utils from zypper
command: zypper lr systemsmanagement_Uyuni_Utils command: zypper lr systemsmanagement_Uyuni_Utils
register: get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils register: get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils
- name: verify adding repository via local .repo file was successful - name: verify adding repository via local .repo file was successful
assert: assert:
that: that:
- "added_by_repo_local_file is changed" - "added_by_repo_local_file is changed"
- "get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils.rc == 0" - "get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils.rc == 0"
- "'/systemsmanagement:/Uyuni:/Utils/' in get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils.stdout" - "'/systemsmanagement:/Uyuni:/Utils/' in get_repository_details_from_zypper_for_systemsmanagement_Uyuni_Utils.stdout"