mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Add try/finally, fix typo in 7zip def file
This commit is contained in:
parent
df50ce7b1b
commit
8bb36b3a4b
@ -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':
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user