diff options
author | Mark Beierl <mark.beierl@emc.com> | 2016-07-14 16:20:44 -0400 |
---|---|---|
committer | Mark Beierl <mark.beierl@emc.com> | 2016-07-14 16:20:44 -0400 |
commit | 2227414bd57f4b7f5f275d915fa8f6a2aa21f8f7 (patch) | |
tree | b7ed9d0e356d27383396d680b059b4ab18069915 /tests/workload_tests | |
parent | ce3f927c2bc98eaf124e96f99cbcc33fbebabeed (diff) |
Separation of test and source
Moving the test files into their own top-level
directory to keep things clean
Change-Id: Ic50b881045bc59b003807923424345b335dd5c95
Signed-off-by: Mark Beierl <mark.beierl@emc.com>
Diffstat (limited to 'tests/workload_tests')
-rw-r--r-- | tests/workload_tests/__init__.py | 8 | ||||
-rw-r--r-- | tests/workload_tests/workload_subclass_test.py | 54 |
2 files changed, 62 insertions, 0 deletions
diff --git a/tests/workload_tests/__init__.py b/tests/workload_tests/__init__.py new file mode 100644 index 0000000..73334c7 --- /dev/null +++ b/tests/workload_tests/__init__.py @@ -0,0 +1,8 @@ +############################################################################## +# Copyright (c) 2015 EMC and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## diff --git a/tests/workload_tests/workload_subclass_test.py b/tests/workload_tests/workload_subclass_test.py new file mode 100644 index 0000000..e9e47f3 --- /dev/null +++ b/tests/workload_tests/workload_subclass_test.py @@ -0,0 +1,54 @@ +############################################################################## +# Copyright (c) 2015 EMC and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +from storperf.workloads.rr import rr +from storperf.workloads.rs import rs +from storperf.workloads.rw import rw +from storperf.workloads.wr import wr +from storperf.workloads.ws import ws +import unittest + + +class WorkloadSubclassTest(unittest.TestCase): + + def setUp(self): + pass + + def test_local_name(self): + workload = rr() + self.assertEqual(workload.fullname, + "None.rr.queue-depth.1.block-size.64k.None", + workload.fullname) + + def test_remote_name(self): + workload = rw() + workload.remote_host = "192.168.0.1" + self.assertEqual(workload.fullname, + "None.rw.queue-depth.1.block-size.64k.192-168-0-1", + workload.fullname) + + def test_blocksize(self): + workload = rs() + workload.options["bs"] = "4k" + self.assertEqual(workload.fullname, + "None.rs.queue-depth.1.block-size.4k.None", + workload.fullname) + + def test_queue_depth(self): + workload = wr() + workload.options["iodepth"] = "8" + self.assertEqual(workload.fullname, + "None.wr.queue-depth.8.block-size.64k.None", + workload.fullname) + + def test_id(self): + workload = ws() + workload.id = "workloadid" + self.assertEqual(workload.fullname, + "workloadid.ws.queue-depth.1.block-size.64k.None", + workload.fullname) |