Add try/finally, fix typo in 7zip def file

This commit is contained in:
twangboy 2018-06-05 13:29:49 -06:00
parent df50ce7b1b
commit 8bb36b3a4b
No known key found for this signature in database
GPG Key ID: 93FF3BDEB278C9EB
2 changed files with 19 additions and 15 deletions

View File

@ -1,6 +1,6 @@
{% set versions = {'18':['05', '03', '01'], '16':['04', '03', '02', '00'], '9':['20']} %}
Zzip:
7zip:
{% for major, subversions in versions.items() %}
{% for minor in subversions %}
'{{major}}.{{minor}}.00.0':

View File

@ -261,13 +261,15 @@ class PkgTest(ModuleCase, SaltReturnAssertsMixin):
except AssertionError:
self.assertSaltTrueReturn(self.run_state('pkg.removed', name=None, pkgs=pkg_targets))
ret = self.run_state('pkg.installed',
name=None,
pkgs=pkg_targets,
refresh=False)
self.assertSaltTrueReturn(ret)
ret = self.run_state('pkg.removed', name=None, pkgs=pkg_targets)
self.assertSaltTrueReturn(ret)
try:
ret = self.run_state('pkg.installed',
name=None,
pkgs=pkg_targets,
refresh=False)
self.assertSaltTrueReturn(ret)
finally:
ret = self.run_state('pkg.removed', name=None, pkgs=pkg_targets)
self.assertSaltTrueReturn(ret)
@requires_system_grains
def test_pkg_004_installed_multipkg_with_version(self, grains=None):
@ -309,13 +311,15 @@ class PkgTest(ModuleCase, SaltReturnAssertsMixin):
pkgs = [{pkg_targets[0]: version}, pkg_targets[1]]
ret = self.run_state('pkg.installed',
name=None,
pkgs=pkgs,
refresh=False)
self.assertSaltTrueReturn(ret)
ret = self.run_state('pkg.removed', name=None, pkgs=pkg_targets)
self.assertSaltTrueReturn(ret)
try:
ret = self.run_state('pkg.installed',
name=None,
pkgs=pkgs,
refresh=False)
self.assertSaltTrueReturn(ret)
finally:
ret = self.run_state('pkg.removed', name=None, pkgs=pkg_targets)
self.assertSaltTrueReturn(ret)
@requires_system_grains
def test_pkg_005_installed_32bit(self, grains=None):