add the option to include verify/repair/cleanups in the job table on the host detail page.
* added RPC get_host_queue_entries_and_special_tasks, which returns both HQEs and SpecialTasks for a host in a carefully interleaved manner.
* added appropriate frontend unit tests
* added support to HostDetailView to include these entries, but have them not be selectable. this required changes to SelectionManager. I also added a utility method to Utils for opening a new window, and changed all sites that do that to call the new method.
Signed-off-by: Steve Howard <showard@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3385 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/models_test.py b/frontend/afe/models_test.py
index bb20103..7094881 100644
--- a/frontend/afe/models_test.py
+++ b/frontend/afe/models_test.py
@@ -16,12 +16,26 @@
self._frontend_common_teardown()
- def test_execution_path(self):
- task = models.SpecialTask.objects.create(
+ def _create_task(self):
+ return models.SpecialTask.objects.create(
host=self.hosts[0], task=models.SpecialTask.Task.VERIFY)
+
+ def test_execution_path(self):
+ task = self._create_task()
self.assertEquals(task.execution_path(), 'hosts/host1/1-verify')
+ def test_status(self):
+ task = self._create_task()
+ self.assertEquals(task.status, 'Queued')
+
+ task.update_object(is_active=True)
+ self.assertEquals(task.status, 'Running')
+
+ task.update_object(is_active=False, is_complete=True)
+ self.assertEquals(task.status, 'Completed')
+
+
if __name__ == '__main__':
unittest.main()