mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Attempt to fix failing grains tests in 2016.3
The tearDown appears to only be removing the grain if it matches a specific value. This may be leading to the grain value not being blank at the time the next test is run. Instead of only deleting the grain if it matches a specific value, instead delete all items from that grain to ensure that it is empty for the next test.
This commit is contained in:
parent
b042484455
commit
5d84b40bfd
1 changed files with 2 additions and 3 deletions
|
@ -142,9 +142,8 @@ class GrainsAppendTestCase(integration.ModuleCase):
|
|||
GRAIN_VAL = 'my-grain-val'
|
||||
|
||||
def tearDown(self):
|
||||
test_grain = self.run_function('grains.get', [self.GRAIN_KEY])
|
||||
if test_grain and test_grain == [self.GRAIN_VAL]:
|
||||
self.run_function('grains.remove', [self.GRAIN_KEY, self.GRAIN_VAL])
|
||||
for item in self.run_function('grains.get', [self.GRAIN_KEY])
|
||||
self.run_function('grains.remove', [self.GRAIN_KEY, item])
|
||||
|
||||
def test_grains_append(self):
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue