Skip to content

Commit b1123da

Browse files
author
Paul Breaux
committed
During functional testing against 12.1.0, sys/application test fails and
errors out Issues: Fixes #580 Problem: This is a bug in application.py where we expected the call to create an application service to raise an HTTPError, which was happening in versions prior to 12.1.0. This is now fixed on the BIG-IP and when testing against 12.1.0, it revealed a bug in our code where (in the happy path) we weren't returning the result from the call to super()._create(). That was returning None as the object back from a create call. Analysis: Added return to the super call in the overridden version of _create in Service. Added checks in each of the functional tests to ensure that the thing that is returned from a create is not None. Tests: Ran tests against 12.1.0 for this suite and 11.5.4
1 parent a80450e commit b1123da

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

f5/bigip/tm/sys/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _create(self, **kwargs):
111111
'''
112112

113113
try:
114-
super(Service, self)._create(**kwargs)
114+
return super(Service, self)._create(**kwargs)
115115
except HTTPError as ex:
116116
if "The configuration was updated successfully but could not be " \
117117
"retrieved" not in ex.response.text:

test/functional/tm/sys/test_sys_application.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def teardown():
5959
partition=partition,
6060
actions=definition
6161
)
62+
assert test_template is not None
6263
return template_s, test_template
6364

6465

@@ -75,12 +76,14 @@ def teardown():
7576
partition=partition,
7677
actions=definition
7778
)
79+
assert test_template is not None
7880
test_service = service_s.service.create(
7981
name=name,
8082
partition=partition,
8183
template=template_name,
8284
trafficGroup=tgroup
8385
)
86+
assert test_service is not None
8487
request.addfinalizer(teardown)
8588
return service_s, test_service
8689

0 commit comments

Comments
 (0)