def Start(self, port): args = util.AttrDict( {'host_port': { 'host': 'localhost', 'port': port }}) return Start(args, self._GetLogNo())
def Start(self, port): args = util.AttrDict( {'host_port': { 'host': 'localhost', 'port': port, }}) return StartFirestoreEmulator(args, self._GetLogNo())
def Start(self, port): args = util.AttrDict({ 'host_port': { 'host': 'localhost', 'port': port, }, 'store_on_disk': True, 'consistency': 0.9, 'data_dir': tempfile.mkdtemp(), }) PrepareGCDDataDir(args) return StartGCDEmulator(args, self._GetLogNo())
def testRun(self): default = util.AttrDict({'host_port': {'host': 'localhost', 'port': 1111}}) self.StartObjectPatch(pubsub_util.util, 'AttrDict', return_value=default) self.Run(self.base_cmd + '--emulators=pubsub') self.proxy_exec_mock.assert_called_with(args=['/tmp/file', '/tmp/file']) self.proxy_prefix_output_mock.assert_called_with('proc', 'emulator-reverse-proxy') pubsub_expected = self._ExpectedPubsubCommand( ['--host=localhost', '--port=1111']) self.pubsub_exec_mock.assert_called_with(pubsub_expected, log_file=1)