summaryrefslogtreecommitdiff
path: root/test/unit/proxy
diff options
context:
space:
mode:
authorAlistair Coles <alistairncoles@gmail.com>2023-02-09 13:33:37 +0000
committerAlistair Coles <alistairncoles@gmail.com>2023-02-09 13:33:37 +0000
commit37ba5577a7c6da25af2d9687bac55365433aa746 (patch)
tree66a3f7d6a32e3c633fa6ca580c3bc626b23d8647 /test/unit/proxy
parent231a67e1e9d4b752bb5ca8c465a887e36ef8c2bb (diff)
downloadswift-37ba5577a7c6da25af2d9687bac55365433aa746.tar.gz
Delete unused FakeObjectController
The FakeObjectController class has not been used for since [1]. [1] Related-Change: Ib3b3830c246816dd549fc74be98b4bc651e7bace Change-Id: I338f89a7862b3b423f229655dcf83ddd3b0b2758
Diffstat (limited to 'test/unit/proxy')
-rw-r--r--test/unit/proxy/test_server.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py
index a2eb7f95f..e91325827 100644
--- a/test/unit/proxy/test_server.py
+++ b/test/unit/proxy/test_server.py
@@ -11526,51 +11526,6 @@ class TestAccountControllerFakeGetResponse(unittest.TestCase):
self.assertEqual(h['read-only'], ['bas'])
-class FakeObjectController(object):
-
- def __init__(self):
- self.app = self
- self.logger = self
- self.account_name = 'a'
- self.container_name = 'c'
- self.object_name = 'o'
- self.trans_id = 'tx1'
- self.object_ring = FakeRing()
- self.node_timeout = 1
- self.rate_limit_after_segment = 3
- self.rate_limit_segments_per_sec = 2
- self.GETorHEAD_base_args = []
-
- def exception(self, *args):
- self.exception_args = args
- self.exception_info = sys.exc_info()
-
- def GETorHEAD_base(self, *args):
- self.GETorHEAD_base_args.append(args)
- req = args[0]
- path = args[4]
- body = data = path[-1] * int(path[-1])
- if req.range:
- r = req.range.ranges_for_length(len(data))
- if r:
- (start, stop) = r[0]
- body = data[start:stop]
- resp = Response(app_iter=iter(body))
- return resp
-
- def iter_nodes(self, ring, partition, logger):
- for node in ring.get_part_nodes(partition):
- yield node
- for node in ring.get_more_nodes(partition):
- yield node
-
- def sort_nodes(self, nodes):
- return nodes
-
- def set_node_timing(self, node, timing):
- return
-
-
class TestProxyObjectPerformance(unittest.TestCase):
def setUp(self):