@@ -90,41 +90,43 @@ salt_testing_repo:
90
90
91
91
{% set salt_minion_is_installed = salt[" pkg.info_installed" ](" salt-minion" ).get(" salt-minion" , False ) %}
92
92
93
- {% if grains[' os_family' ] == ' Suse' and grains[' osfullname' ] in [' SL-Micro' , ' openSUSE Tumbleweed' ] %}
94
- {% set salt_classic_pkgs = " python3{{ grains['pythonversion'][1] }} -salt-testsuite python3{{ grains['pythonversion'][1] }} -salt" %}
95
- {% set salt_test_executor = " python3{{ grains['pythonversion'][1] }} -salt-test" %}
96
- {% else %}
97
- {% set salt_classic_pkgs = " python3-salt-testsuite python3-salt" %}
98
- {% set salt_test_executor = " python3-salt-test" %}
99
- {% endif %}
93
+ salt_version_testing_repo:
94
+ cmd.run :
95
+ - name: zypper search -x -t package -s --repo salt_testing_repo salt | grep "| salt |" | cut -d"|" -f4 | tr -d ' ' > /tmp/salt_version_testing_repo
96
+ - require:
97
+ - pkgrepo: salt_testing_repo
100
98
101
99
install_salt_testsuite:
102
100
{% if grains[' os_family' ] == ' Suse' and grains[' osfullname' ] == ' SL-Micro' %}
103
101
cmd.run :
104
- - name: transactional-update -c -n pkg in {{ salt_classic_pkgs }} {{ salt_test_executor }}
102
+ - name: |
103
+ SALT_VERSION=`cat /tmp/salt_version_testing_repo`
104
+ transactional-update -c -n pkg in --capability python3-salt-testsuite-$SALT_VERSION python3-salt-test python3-salt-$SALT_VERSION
105
105
{% else %}
106
106
{# HACK: we call zypper manually to ensure right packages are installed regardless upgrade/downgrade #}
107
107
cmd.run :
108
108
{# We install docker first to ensure zypper does not resolve this dependency to podman-docker #}
109
109
{% if salt_minion_is_installed %}
110
110
- name: |
111
111
zypper --non-interactive in --force docker
112
- zypper --non-interactive in --force --from salt_testing_repo {{ salt_classic_pkgs }} salt salt-minion
112
+ SALT_VERSION=`cat /tmp/salt_version_testing_repo`
113
+ zypper --non-interactive in --capability --from salt_testing_repo python3-salt-$SALT_VERSION salt-$SALT_VERSION python3-salt-testsuite-$SALT_VERSION salt-minion-$SALT_VERSION
113
114
{% else %}
114
115
- name: |
115
116
zypper --non-interactive in --force docker
116
- zypper --non-interactive in --force --from salt_testing_repo {{ salt_classic_pkgs }} salt
117
+ SALT_VERSION=`cat /tmp/salt_version_testing_repo`
118
+ zypper --non-interactive in --capability --from salt_testing_repo python3-salt-$SALT_VERSION salt-$SALT_VERSION python3-salt-testsuite-$SALT_VERSION
117
119
{% endif %}
118
- - fromrepo: salt_testing_repo
119
120
{% endif %}
120
121
- require:
121
122
- pkgrepo: salt_testsuite_dependencies_repo
122
123
- pkgrepo: salt_testing_repo
124
+ - cmd: salt_version_testing_repo
123
125
124
126
install_salt_tests_executor:
125
127
{% if grains[' os_family' ] == ' Suse' and grains[' osfullname' ] == ' SL-Micro' %}
126
128
cmd.run :
127
- - name: transactional-update -c -n pkg in {{ salt_test_executor }}
129
+ - name: transactional-update -c -n pkg in python3-salt-test
128
130
{% else %}
129
131
pkg.installed :
130
132
- pkgs:
0 commit comments