mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases (#2571)
* rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases. * Fix the unit test error: The new release_matcher could pass a wider range of patterns but that would not cause extra issue to the whole module. * Submit the changelog fragment. * Update changelogs/fragments/2571-rhsm_release-fix-release_matcher.yaml Co-authored-by: Amin Vakil <info@aminvakil.com> Co-authored-by: Amin Vakil <info@aminvakil.com>
This commit is contained in:
parent
cc293f90a2
commit
593d622438
3 changed files with 7 additions and 6 deletions
|
@ -125,13 +125,12 @@ class RhsmRepositoryReleaseModuleTestCase(ModuleTestCase):
|
|||
|
||||
def test_release_matcher(self):
|
||||
# throw a few values at the release matcher -- only sane_values should match
|
||||
sane_values = ['1Server', '10Server', '1.10', '10.0']
|
||||
sane_values = ['1Server', '1Client', '10Server', '1.10', '10.0', '9']
|
||||
insane_values = [
|
||||
'6server', # lowercase 's'
|
||||
'100Server', # excessively long 'x' component
|
||||
'100.0', # excessively long 'x' component
|
||||
'6.100', # excessively long 'y' component
|
||||
'100.100', # excessively long 'x' and 'y' components
|
||||
'+.-', # illegal characters
|
||||
]
|
||||
|
||||
matches = self.module.release_matcher.findall(' '.join(sane_values + insane_values))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue