Creates a new instance of the mock server. You must actually call 'start()' for it to be invoked. :param list buckets: A list of BucketSpec items :param string runpath: a string pointing to the location of the mock :param string url: The URL to use to downloa
(self,
buckets, # type: List[LegacyMockBucketSpec]
jar_path, # type: str
url=None, # type: str
replicas=None, # type: int
vbuckets=None, # type: int
nodes=4 # type: int
)
| 123 | class LegacyMockServer(MockServer): |
| 124 | |
| 125 | def __init__(self, |
| 126 | buckets, # type: List[LegacyMockBucketSpec] |
| 127 | jar_path, # type: str |
| 128 | url=None, # type: str |
| 129 | replicas=None, # type: int |
| 130 | vbuckets=None, # type: int |
| 131 | nodes=4 # type: int |
| 132 | ): |
| 133 | """ |
| 134 | Creates a new instance of the mock server. You must actually call |
| 135 | 'start()' for it to be invoked. |
| 136 | :param list buckets: A list of BucketSpec items |
| 137 | :param string runpath: a string pointing to the location of the mock |
| 138 | :param string url: The URL to use to download the mock. This is only |
| 139 | used if runpath does not exist |
| 140 | :param int replicas: How many replicas should each bucket have |
| 141 | :param int vbuckets: How many vbuckets should each bucket have |
| 142 | :param int nodes: How many total nodes in the cluster |
| 143 | |
| 144 | Note that you must have ``java`` in your `PATH` |
| 145 | """ |
| 146 | |
| 147 | super().__init__() |
| 148 | self._validate_jar(jar_path, url) |
| 149 | self._jar_path = jar_path |
| 150 | self._url = url |
| 151 | self._buckets = buckets |
| 152 | self._nodes = nodes |
| 153 | self._vbuckets = vbuckets |
| 154 | self._replicas = replicas |
| 155 | |
| 156 | # @property |
| 157 | # def rest_port(self): |
nothing calls this directly
no test coverage detected