diff options
author | Mark Beierl <mark.beierl@dell.com> | 2018-01-11 20:51:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-01-11 20:51:11 +0000 |
commit | fe3f5e7d38a10bfca274b9ce0f8c7db0510c26ad (patch) | |
tree | 537fac37fa469da701b8d9bfe3f6eefdc08e19df /docker/storperf-master/tests | |
parent | b697f58b66c8ae425a6cccd22ba5740d9168f5ce (diff) | |
parent | f0e1ee0ccc25acf74f472146f4219350bfec0248 (diff) |
Merge "WIP - Use SNAPS to launch StorPerf Stack"
Diffstat (limited to 'docker/storperf-master/tests')
-rw-r--r-- | docker/storperf-master/tests/storperf_master_test.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/docker/storperf-master/tests/storperf_master_test.py b/docker/storperf-master/tests/storperf_master_test.py index e824a5f..f328982 100644 --- a/docker/storperf-master/tests/storperf_master_test.py +++ b/docker/storperf-master/tests/storperf_master_test.py @@ -10,10 +10,21 @@ import os import unittest +import mock + from storperf.db.configuration_db import ConfigurationDB from storperf.storperf_master import StorPerfMaster +class MockStack(object): + + def __init__(self): + pass + + def get_stack(self): + return None + + class StorPerfMasterTest(unittest.TestCase): def setUp(self): @@ -22,7 +33,12 @@ class StorPerfMasterTest(unittest.TestCase): os.remove(ConfigurationDB.db_name) except OSError: pass - self.storperf = StorPerfMaster() + with mock.patch("storperf.storperf_master.OSCreds"), \ + mock.patch( + "storperf.storperf_master.OpenStackHeatStack") as oshs: + oshs.return_value.get_stack.return_value = None + + self.storperf = StorPerfMaster() def tearDown(self): try: |