2020-04-02 20:10:20 -05:00
|
|
|
"""
|
2018-04-27 15:22:38 -05:00
|
|
|
Test the core grains
|
2020-04-02 20:10:20 -05:00
|
|
|
"""
|
2018-04-27 15:22:38 -05:00
|
|
|
|
2020-04-10 08:30:25 +01:00
|
|
|
import pytest
|
2022-07-20 10:42:30 +01:00
|
|
|
|
2018-04-27 15:22:38 -05:00
|
|
|
from tests.support.case import ModuleCase
|
|
|
|
|
|
|
|
|
2020-04-10 08:30:25 +01:00
|
|
|
@pytest.mark.windows_whitelisted
|
2018-04-27 15:22:38 -05:00
|
|
|
class TestGrainsCore(ModuleCase):
|
2020-04-02 20:10:20 -05:00
|
|
|
"""
|
2018-04-27 15:22:38 -05:00
|
|
|
Test the core grains grains
|
2020-04-02 20:10:20 -05:00
|
|
|
"""
|
2018-04-27 15:22:38 -05:00
|
|
|
|
2021-01-31 08:57:48 +00:00
|
|
|
@pytest.mark.slow_test
|
2018-04-27 15:22:38 -05:00
|
|
|
def test_grains_passed_to_custom_grain(self):
|
2020-04-02 20:10:20 -05:00
|
|
|
"""
|
2018-04-27 15:22:38 -05:00
|
|
|
test if current grains are passed to grains module functions that have a grains argument
|
2020-04-02 20:10:20 -05:00
|
|
|
"""
|
2018-04-27 15:22:38 -05:00
|
|
|
self.assertEqual(
|
|
|
|
self.run_function("grains.get", ["custom_grain_test"]), "itworked"
|
|
|
|
)
|