Skip to content

Commit

Permalink
Issues: Install test does not test validity of packages (rpm/deb)
Browse files Browse the repository at this point in the history
Fixes F5Networks#494

Problem:
The test install algorithm to work with a more generic pool

Analysis:
I made the changes to make it so that the .deb and .rpm install tests
would do what they're supposed to do.  Before this change, the .deb and
.rpm failures were not being properly tracked and would always fail due
to improper regExp handling of expected strings.

Tests:
This is a test.  To validate that this executes properly, use the
.travis_yml file in its normal execution phasing.
  • Loading branch information
sorensF5 committed Jan 25, 2017
1 parent 620bc47 commit f531e8a
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

from collections import deque, namedtuple

dep_match_re = re.compile('^((python|f5-sdk)[\w\-]*)\s([<>=]{1,2})\s(\S+)')
dep_match_re = \
re.compile('^((python|f5-sdk|f5-icontrol-rest)[\w\-]*)' +
'\s([<>=]{1,2})\s(\S+)')


def usage():
Expand Down Expand Up @@ -94,15 +96,18 @@ def fetch_agent_dependencies(dist_dir, version, release, agent_pkg):
else:
print("Success")

sdk_reqs = deque() # can use later in a loop-through to validate compliance
for line in output.split('\n'):
m = dep_match_re.search(line)
if m:
my_dep = ReqDetails(*m.groups())
if 'f5-icontrol-rest' in my_dep.name and \
re.search('^>?=', my_dep.oper):
f5_icr_version = my_dep.version
break
if not f5_sdk_version:
groups = m.groups()
my_dep = ReqDetails(groups[0], groups[2], groups[3])
if 'f5-icontrol-rest' in my_dep.name:
if re.search('^>?=', my_dep.oper):
f5_icr_version = my_dep.version
else:
sdk_reqs.append(my_dep)
if not f5_icr_version:
print("Can't find f5-sdk dependency for %s" % (f5_sdk_pkg))
return 1

Expand Down

0 comments on commit f531e8a

Please sign in to comment.