summaryrefslogtreecommitdiffstats
path: root/tests/utilities_tests/data_handler_test.py
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-06-07 21:11:55 -0400
committerMark Beierl <mark.beierl@dell.com>2017-06-08 02:30:58 +0000
commit752372ec7c50f9cd1e3f012f33e50ee88362ad81 (patch)
treeade229a4d80876036d5a356dd70039ef619015a0 /tests/utilities_tests/data_handler_test.py
parenta2de73c1d6d66bb9624e192d95c6a540cf31b6f7 (diff)
Allow User-Specified Sample Size
Adds the ability to accept steady_state_sample_size as a parameter. Removes deprecated nowarm and nossd. Adds OS_PROJECT_DOMAIN_ID. Change-Id: I00c01b05cd2cbf001bc5446faa30f36137350ccf JIRA: STORPERF-139 Signed-off-by: mbeierl <mark.beierl@dell.com> (cherry picked from commit c7806a0f08f6114d8b1f037a77af041a2b0364d5)
Diffstat (limited to 'tests/utilities_tests/data_handler_test.py')
-rw-r--r--tests/utilities_tests/data_handler_test.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/utilities_tests/data_handler_test.py b/tests/utilities_tests/data_handler_test.py
index 4630d54..6d57b0d 100644
--- a/tests/utilities_tests/data_handler_test.py
+++ b/tests/utilities_tests/data_handler_test.py
@@ -8,12 +8,11 @@
##############################################################################
import os
+from storperf.utilities.data_handler import DataHandler
import unittest
import mock
-from storperf.utilities.data_handler import DataHandler
-
class MockGraphiteDB(object):
@@ -32,6 +31,7 @@ class DataHandlerTest(unittest.TestCase):
self._terminated = False
self.args = None
self.start_time = 0
+ self.steady_state_samples = 10
self.end_time = 1
self.metadata = {}
self.block_sizes = "1"
@@ -96,7 +96,8 @@ class DataHandlerTest(unittest.TestCase):
[1480456040, 219.28],
[1480456050, 217.75]]
- actual = self.data_handler._evaluate_prior_data(series)
+ actual = self.data_handler._evaluate_prior_data(
+ series, self.steady_state_samples)
self.assertEqual(False, actual)
def test_long_not_steady_sample(self):
@@ -106,7 +107,8 @@ class DataHandlerTest(unittest.TestCase):
[4804560300, 21937],
[4804560400, 21928],
[4804560500, 21775]]
- actual = self.data_handler._evaluate_prior_data(series)
+ actual = self.data_handler._evaluate_prior_data(
+ series, self.steady_state_samples)
self.assertEqual(False, actual)
def test_long_steady_sample(self):
@@ -120,7 +122,8 @@ class DataHandlerTest(unittest.TestCase):
[4804560300, 219.37],
[4804560400, 219.28],
[4804560500, 217.75]]
- actual = self.data_handler._evaluate_prior_data(series)
+ actual = self.data_handler._evaluate_prior_data(
+ series, self.steady_state_samples)
self.assertEqual(True, actual)
@mock.patch.dict(os.environ, {'TEST_DB_URL': 'mock'})