Fix a unit test for new octavia-lib

A patch[1] introduced a startup check for the socket paths that
impacted a unit test checking debtcollector is finding the new
octavia-lib location of the DriverLibrary.
This patch correctly mocks out this check for this unit test.

[1] https://review.opendev.org/#/c/665027/

Change-Id: Ife93834654385430d6a333d3d6ee67b719b6c37e
This commit is contained in:
Michael Johnson 2019-07-30 13:49:30 -07:00 committed by Adam Harwell
parent 2111d9e264
commit b32064cdf2
3 changed files with 9 additions and 5 deletions

View File

@ -72,7 +72,7 @@ munch==2.2.0
netaddr==0.7.19
netifaces==0.10.4
networkx==1.11
octavia-lib==1.2.0
octavia-lib==1.3.1
openstacksdk==0.12.0
os-client-config==1.29.0
os-service-types==1.2.0
@ -155,7 +155,7 @@ stevedore==1.20.0
taskflow==2.16.0
tempest==17.1.0
Tempita==0.5.2
tenacity==4.9.0
tenacity==5.0.4
testrepository==0.0.18
testresources==2.0.0
testscenarios==0.4

View File

@ -26,6 +26,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import octavia_lib.api.drivers.driver_lib as lib_driver_lib
from octavia.api.drivers import driver_lib
@ -38,6 +40,8 @@ class TestDriverLib(base.TestCase):
super(TestDriverLib, self).setUp()
# Silly test to check that debtcollector moves is working
def test_driver_lib_exists(self):
@mock.patch('octavia_lib.api.drivers.driver_lib.DriverLibrary.'
'_check_for_socket_ready')
def test_driver_lib_exists(self, mock_ready):
driver_lib_class = driver_lib.DriverLibrary()
self.assertIsInstance(driver_lib_class, lib_driver_lib.DriverLibrary)

View File

@ -41,11 +41,11 @@ taskflow>=2.16.0 # Apache-2.0
diskimage-builder!=1.6.0,!=1.7.0,!=1.7.1,>=1.1.2 # Apache-2.0
futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
castellan>=0.16.0 # Apache-2.0
tenacity>=4.9.0 # Apache-2.0
tenacity>=5.0.4 # Apache-2.0
distro>=1.2.0 # Apache-2.0
jsonschema>=2.6.0 # MIT
debtcollector>=1.19.0 # Apache-2.0
octavia-lib>=1.2.0 # Apache-2.0
octavia-lib>=1.3.1 # Apache-2.0
#for the amphora api
Flask!=0.11,>=0.10 # BSD