diff options
author | 2016-05-04 22:53:07 -0400 | |
---|---|---|
committer | 2016-05-05 14:58:39 -0400 | |
commit | 05e863781ce6746fabec176d1fc5f7454f2cdd73 (patch) | |
tree | 0ff7f2aa9e55b33c3f95c0521bbd3991a9e4e2c0 /storperf/tests/carbon_tests | |
parent | 1e0544d70dabed4f33e0624cb4a7cde4c8c6b691 (diff) |
Add Stats report and Swagger UI
Add Swagger web ui at /swagger
Add ability to fetch read/write latency status via ReST ui
Can now delete where stack was removed from OpenStack but not from the
storperf DB
Change to use Floating IPs instead of private IP
Fix delete bug where there was no dependency on resources in
the resource group.
JIRA: STORPERF-19
JIRA: STORPERF-20
Change-Id: I0a4b3386789c38d6745906ba896b8ff851dc122f
Signed-off-by: Mark Beierl <mark.beierl@emc.com>
Diffstat (limited to 'storperf/tests/carbon_tests')
-rw-r--r-- | storperf/tests/carbon_tests/emitter_test.py | 4 | ||||
-rw-r--r-- | storperf/tests/carbon_tests/json_to_carbon_test.py | 31 |
2 files changed, 17 insertions, 18 deletions
diff --git a/storperf/tests/carbon_tests/emitter_test.py b/storperf/tests/carbon_tests/emitter_test.py index f3ff57e..fe19ed2 100644 --- a/storperf/tests/carbon_tests/emitter_test.py +++ b/storperf/tests/carbon_tests/emitter_test.py @@ -44,9 +44,9 @@ class CarbonMetricTransmitterTest(unittest.TestCase): def test_transmit_metrics(self): - testconv = converter.JSONToCarbon() + testconv = converter.Converter() json_object = json.loads("""{"timestamp" : "12345", "key":"value" }""") - result = testconv.convert_to_dictionary(json_object, "host.run-name") + result = testconv.convert_json_to_flat(json_object, "host.run-name") emitter = CarbonMetricTransmitter() emitter.carbon_port = self.listen_port diff --git a/storperf/tests/carbon_tests/json_to_carbon_test.py b/storperf/tests/carbon_tests/json_to_carbon_test.py index d309b48..523ff77 100644 --- a/storperf/tests/carbon_tests/json_to_carbon_test.py +++ b/storperf/tests/carbon_tests/json_to_carbon_test.py @@ -7,7 +7,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -from storperf.carbon.converter import JSONToCarbon +from storperf.carbon.converter import Converter import json import unittest @@ -58,45 +58,45 @@ class JSONToCarbonTest(unittest.TestCase): pass def test_to_string(self): - testconv = JSONToCarbon() + testconv = Converter() json_object = json.loads(self.simple_fio_json) - result = testconv.convert_to_dictionary(json_object, "host.run-name") + result = testconv.convert_json_to_flat(json_object, "host.run-name") self.assertEqual("7116", result[ "host.run-name.jobs.1.read.io_bytes"], result["host.run-name.jobs.1.read.io_bytes"]) def test_single_text_element_no_prefix(self): - testconv = JSONToCarbon() - result = testconv.convert_to_dictionary( + testconv = Converter() + result = testconv.convert_json_to_flat( json.loads(self.single_json_text_element)) self.assertEqual("value", result["key"], result["key"]) def test_single_numeric_element_no_prefix(self): - testconv = JSONToCarbon() - result = testconv.convert_to_dictionary( + testconv = Converter() + result = testconv.convert_json_to_flat( json.loads(self.single_json_numeric_element)) self.assertEqual("123", result["key"], result["key"]) def test_single_text_key_space_element_no_prefix(self): - testconv = JSONToCarbon() - result = testconv.convert_to_dictionary( + testconv = Converter() + result = testconv.convert_json_to_flat( json.loads(self.single_json_key_with_spaces)) self.assertEqual( "value", result["key_with_spaces"], result["key_with_spaces"]) def test_single_text_value_space_element_no_prefix(self): - testconv = JSONToCarbon() - result = testconv.convert_to_dictionary( + testconv = Converter() + result = testconv.convert_json_to_flat( json.loads(self.single_json_value_with_spaces)) self.assertEqual("value_with_spaces", result["key"], result["key"]) def test_map_name_with_space_no_prefix(self): - testconv = JSONToCarbon() - result = testconv.convert_to_dictionary( + testconv = Converter() + result = testconv.convert_json_to_flat( json.loads(self.json_map_name_with_spaces)) self.assertEqual( @@ -104,14 +104,13 @@ class JSONToCarbonTest(unittest.TestCase): result["map_with_spaces.key"]) def test_list_name_with_space_no_prefix(self): - testconv = JSONToCarbon() - result = testconv.convert_to_dictionary( + testconv = Converter() + result = testconv.convert_json_to_flat( json.loads(self.json_list_name_with_spaces)) self.assertEqual( "value", result["list_with_spaces.1.key"], result["list_with_spaces.1.key"]) - if __name__ == '__main__': unittest.main() |