mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #42062 from terminalmage/arch-grains-test
Add debug logging for grains tests
This commit is contained in:
commit
5b2ae2dd04
@ -5,6 +5,7 @@ Test the grains module
|
||||
|
||||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
|
||||
@ -13,6 +14,8 @@ from tests.support.case import ModuleCase
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestModulesGrains(ModuleCase):
|
||||
'''
|
||||
@ -109,11 +112,12 @@ class TestModulesGrains(ModuleCase):
|
||||
'''
|
||||
test to ensure some core grains are returned
|
||||
'''
|
||||
grains = ['os', 'os_family', 'osmajorrelease', 'osrelease', 'osfullname', 'id']
|
||||
grains = ('os', 'os_family', 'osmajorrelease', 'osrelease', 'osfullname', 'id')
|
||||
os = self.run_function('grains.get', ['os'])
|
||||
|
||||
for grain in grains:
|
||||
get_grain = self.run_function('grains.get', [grain])
|
||||
log.debug('Value of \'%s\' grain: \'%s\'', grain, get_grain)
|
||||
if os == 'Arch' and grain in ['osmajorrelease']:
|
||||
self.assertEqual(get_grain, '')
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user