From 6dd5cb5dea38553a236656592d423ec258cf3297 Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Thu, 9 Apr 2020 08:24:23 -0500 Subject: [PATCH] Fix tests for OpenSUSE 15.1 (#139) * [zypper] Fix tests for OpenSUSE 15.1 Signed-off-by: Rick Elrod * [setup_mysql_db] Fix tests for OpenSUSE 15.1 Signed-off-by: Rick Elrod * Update tests/integration/targets/setup_mysql_db/tasks/main.yml * Re-enable zypper_repository tests. Co-authored-by: Felix Fontein --- tests/integration/targets/setup_mysql_db/tasks/main.yml | 7 +++++++ tests/integration/targets/zypper/tasks/zypper.yml | 9 +++++++-- tests/integration/targets/zypper_repository/aliases | 1 - 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/integration/targets/setup_mysql_db/tasks/main.yml b/tests/integration/targets/setup_mysql_db/tasks/main.yml index 6c45ea3575..b7c5e06b78 100644 --- a/tests/integration/targets/setup_mysql_db/tasks/main.yml +++ b/tests/integration/targets/setup_mysql_db/tasks/main.yml @@ -63,6 +63,13 @@ when: ansible_facts.pkg_mgr == 'apt' notify: cleanup mysql +- name: install mysqldb_test opensuse dependencies + zypper: + name: "{{ mysql_packages }}" + state: latest + when: ansible_facts.pkg_mgr in ['zypper', 'community.general.zypper'] + notify: cleanup mysql + - name: install mysqldb_test FreeBSD dependencies package: name: "{{ mysql_packages }}" diff --git a/tests/integration/targets/zypper/tasks/zypper.yml b/tests/integration/targets/zypper/tasks/zypper.yml index fb2dd7a892..2b29a96679 100644 --- a/tests/integration/targets/zypper/tasks/zypper.yml +++ b/tests/integration/targets/zypper/tasks/zypper.yml @@ -1,10 +1,10 @@ - name: get hello package version - shell: zypper --xml se -svx hello | grep 'name="hello"' | sed 's/.*edition="\([^ ]*\)".*/\1/' + shell: zypper --xml se -svx hello | grep 'name="hello"' | grep 'repository="Main Repository"' | sed 's/.*edition="\([^ ]*\)".*/\1/' register: hello_version - name: set URL of test package set_fact: - hello_package_url: http://download.opensuse.org/repositories/openSUSE:/Leap:/{{ ansible_distribution_version }}/standard/x86_64/hello-{{ hello_version.stdout }}.x86_64.rpm + hello_package_url: https://download.opensuse.org/distribution/leap/{{ ansible_distribution_version }}/repo/oss/x86_64/hello-{{ hello_version.stdout }}.x86_64.rpm - debug: var=hello_package_url @@ -179,6 +179,11 @@ name: empty state: removed +- name: install rpmbuild + zypper: + name: rpmbuild + state: present + - name: clean zypper RPM cache file: name: /var/cache/zypper/RPMS diff --git a/tests/integration/targets/zypper_repository/aliases b/tests/integration/targets/zypper_repository/aliases index 9326e6ba88..f7aed308a3 100644 --- a/tests/integration/targets/zypper_repository/aliases +++ b/tests/integration/targets/zypper_repository/aliases @@ -4,4 +4,3 @@ skip/aix skip/freebsd skip/osx skip/rhel -disabled #fixme