def _make_kube_watcher(self): resource_version = KubeResourceVersion.get_current_resource_version() watcher = KubernetesJobWatcher(self.namespace, self.watcher_queue, resource_version, self.worker_uuid) watcher.start() return watcher
def _make_kube_watcher(self): resource_version = KubeResourceVersion.get_current_resource_version() watcher = KubernetesJobWatcher(self.namespace, self.watcher_queue, resource_version, self.worker_uuid) watcher.start() return watcher
def test_reset_resource_version(self): session = settings.Session() version = KubeResourceVersion.reset_resource_version(session) self.assertEqual(version, '0') self.assertEqual( KubeResourceVersion.get_current_resource_version(session), '0')
def test_checkpoint_resource_version(self): session = settings.Session() KubeResourceVersion.checkpoint_resource_version('7', session) self.assertEqual( KubeResourceVersion.get_current_resource_version(session), '7')
def test_reset_resource_version(self): session = settings.Session() version = KubeResourceVersion.reset_resource_version(session) self.assertEqual(version, '0') self.assertEqual(KubeResourceVersion.get_current_resource_version(session), '0')
def test_checkpoint_resource_version(self): session = settings.Session() KubeResourceVersion.checkpoint_resource_version('7', session) self.assertEqual(KubeResourceVersion.get_current_resource_version(session), '7')