summaryrefslogtreecommitdiffstats
path: root/tests/storperf_master_test.py
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-06-21 16:02:57 -0400
committermbeierl <mark.beierl@dell.com>2017-06-26 13:00:01 -0400
commit45130c365c235bc4a5a53fd0ddb15f84a1460199 (patch)
tree0b4ea45f11d21d999256a50d081cb1ae9197a634 /tests/storperf_master_test.py
parentf8b67cf03ecbd4d6ab1fd115ef155d4334df266a (diff)
Allow User to Specify Flavor
Adds flavor as parameter to ReST /configurations API and passes it through to the heat template creation. Change-Id: Id3632fb571da9da51b4d75db58c7a7c0a91e0ccf JIRA: STORPERF-92 Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'tests/storperf_master_test.py')
-rw-r--r--tests/storperf_master_test.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/storperf_master_test.py b/tests/storperf_master_test.py
index 2dc810d..c67e3c4 100644
--- a/tests/storperf_master_test.py
+++ b/tests/storperf_master_test.py
@@ -9,18 +9,15 @@
from storperf.db.configuration_db import ConfigurationDB
from storperf.storperf_master import StorPerfMaster
-import os
import unittest
+import sqlite3
class StorPerfMasterTest(unittest.TestCase):
def setUp(self):
- ConfigurationDB.db_name = __name__ + ".db"
- try:
- os.remove(ConfigurationDB.db_name)
- except OSError:
- pass
+ ConfigurationDB.db_name = "file::memory:?cache=shared"
+ db = sqlite3.connect(ConfigurationDB.db_name)
self.storperf = StorPerfMaster()
def test_agent_count(self):
@@ -67,3 +64,12 @@ class StorPerfMasterTest(unittest.TestCase):
self.assertEqual(
expected, actual, "Did not expect: " + str(actual))
+
+ def test_agent_flavor(self):
+ expected = "m1.small"
+
+ self.storperf.agent_flavor = expected
+ actual = self.storperf.agent_flavor
+
+ self.assertEqual(
+ expected, actual, "Did not expect: " + str(actual))