From b6f70ac80fb2e73f1c9fe2d09db9e7e65f23701c Mon Sep 17 00:00:00 2001 From: "C. R. Oldham" Date: Thu, 24 Jul 2014 19:09:52 -0400 Subject: [PATCH 1/2] Make this test check for diff packages on RHEL/Centos 6 vs 7 --- tests/integration/states/pkg.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integration/states/pkg.py b/tests/integration/states/pkg.py index 3c0f9a4987..5c71520f0e 100644 --- a/tests/integration/states/pkg.py +++ b/tests/integration/states/pkg.py @@ -37,7 +37,8 @@ _PKG_TARGETS_32 = { # Test packages with dot in pkg name # (https://github.com/saltstack/salt/issues/8614) _PKG_TARGETS_DOT = { - 'CentOS': 'python-migrate0.5' + 'RedHat': { '6': 'tomcat6-el-2.1-api', + '7': 'tomcat-el-2.2-api' } } @@ -264,8 +265,9 @@ class PkgTest(integration.ModuleCase, This is a destructive test as it installs a package ''' - os_name = grains.get('os', '') - target = _PKG_TARGETS_DOT.get(os_name, '') + os_family = grains.get('os_family', '') + os_version = grains.get('osmajorrelease', [''])[0] + target = _PKG_TARGETS_DOT.get(os_family, '').get(os_version, '') if target: ret = self.run_state('pkg.installed', name=target) self.assertSaltTrueReturn(ret) From 288e9bba29298dfefd19069246abbfb56ff3df5a Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Fri, 25 Jul 2014 10:39:19 -0600 Subject: [PATCH 2/2] TABS?!?!? Really @cro ?? --- tests/integration/states/pkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/states/pkg.py b/tests/integration/states/pkg.py index 5c71520f0e..b401de3260 100644 --- a/tests/integration/states/pkg.py +++ b/tests/integration/states/pkg.py @@ -266,7 +266,7 @@ class PkgTest(integration.ModuleCase, This is a destructive test as it installs a package ''' os_family = grains.get('os_family', '') - os_version = grains.get('osmajorrelease', [''])[0] + os_version = grains.get('osmajorrelease', [''])[0] target = _PKG_TARGETS_DOT.get(os_family, '').get(os_version, '') if target: ret = self.run_state('pkg.installed', name=target)