tests: Select the group to use based on the release
Use c-development on fedora and development on RHEL Related: rhbz#1678937
This commit is contained in:
parent
33dfeed5bb
commit
a2252112d4
@ -42,3 +42,9 @@ def get_file_magic(filename):
|
||||
finally:
|
||||
ms.close()
|
||||
return details
|
||||
|
||||
def this_is_rhel():
|
||||
"""Check to see if the tests are running on RHEL
|
||||
"""
|
||||
release = open("/etc/system-release", "r").read()
|
||||
return "Red Hat Enterprise Linux" in release
|
||||
|
@ -22,6 +22,7 @@ import tempfile
|
||||
import time
|
||||
import unittest
|
||||
|
||||
from ..lib import this_is_rhel
|
||||
from pylorax.sysutils import joinpaths
|
||||
from pylorax.api.config import configure, make_dnf_dirs
|
||||
from pylorax.api.projects import api_time, api_changelog, pkg_to_project, pkg_to_project_info, pkg_to_dep
|
||||
@ -196,7 +197,11 @@ class ProjectsTest(unittest.TestCase):
|
||||
self.assertEqual(modules[0]["dependencies"][0]["name"], "basesystem")
|
||||
|
||||
def test_groups_depsolve(self):
|
||||
deps = projects_depsolve(self.dbo, [], ["c-development"])
|
||||
if this_is_rhel():
|
||||
group_names = ["development"]
|
||||
else:
|
||||
group_names = ["c-development"]
|
||||
deps = projects_depsolve(self.dbo, [], group_names)
|
||||
names = [grp["name"] for grp in deps]
|
||||
self.assertTrue("autoconf" in names) # mandatory package
|
||||
self.assertTrue("ctags" in names) # default package
|
||||
|
Loading…
Reference in New Issue
Block a user