Skip to content

Commit 2e44203

Browse files
committed
Salt Shaker: allow testing python311-salt in SLMicro and Tumbleweed
1 parent 32383e7 commit 2e44203

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

salt/salt_testenv/salt_classic_package.sls

+13-4
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,31 @@ salt_testing_repo:
8989
- gpgkey: http://{{ grains.get("mirror") | default("download.opensuse.org", true) }}/repositories/systemsmanagement:{{ grains["salt_obs_flavor"] }}/{{ repo_path }}/repodata/repomd.xml.key
9090

9191
{% set salt_minion_is_installed = salt["pkg.info_installed"]("salt-minion").get("salt-minion", False) %}
92+
93+
{% if grains['os_family'] == 'Suse' and grains['osfullname'] in ['SL-Micro', 'openSUSE Tumbleweed'] %}
94+
{% set salt_classic_pkgs = "python311-salt-testsuite python311-salt" %}
95+
{% set salt_test_executor = "python311-salt-test" %}
96+
{% else %}
97+
{% set salt_classic_pkgs = "python3-salt-testsuite python3-salt" %}
98+
{% set salt_test_executor = "python3-salt-test" %}
99+
{% endif %}
100+
92101
install_salt_testsuite:
93102
{% if grains['os_family'] == 'Suse' and grains['osfullname'] == 'SL-Micro' %}
94103
cmd.run:
95-
- name: transactional-update -c -n pkg in python3-salt-testsuite python3-salt-test python3-salt
104+
- name: transactional-update -c -n pkg in {{ salt_classic_pkgs }} {{ salt_test_executor }}
96105
{% else %}
97106
{# HACK: we call zypper manually to ensure right packages are installed regardless upgrade/downgrade #}
98107
cmd.run:
99108
{# We install docker first to ensure zypper does not resolve this dependency to podman-docker #}
100109
{% if salt_minion_is_installed %}
101110
- name: |
102111
zypper --non-interactive in --force docker
103-
zypper --non-interactive in --force --from salt_testing_repo python3-salt salt python3-salt-testsuite salt-minion
112+
zypper --non-interactive in --force --from salt_testing_repo {{ salt_classic_pkgs }} salt salt-minion
104113
{% else %}
105114
- name: |
106115
zypper --non-interactive in --force docker
107-
zypper --non-interactive in --force --from salt_testing_repo python3-salt salt python3-salt-testsuite
116+
zypper --non-interactive in --force --from salt_testing_repo {{ salt_classic_pkgs }} salt
108117
{% endif %}
109118
- fromrepo: salt_testing_repo
110119
{% endif %}
@@ -115,7 +124,7 @@ install_salt_testsuite:
115124
install_salt_tests_executor:
116125
{% if grains['os_family'] == 'Suse' and grains['osfullname'] == 'SL-Micro' %}
117126
cmd.run:
118-
- name: transactional-update -c -n pkg in python3-salt-test
127+
- name: transactional-update -c -n pkg in {{ salt_test_executor }}
119128
{% else %}
120129
pkg.installed:
121130
- pkgs:

0 commit comments

Comments
 (0)