scheduler: add job's tags to the rpc job_list method
This change adds the job's tags to the jobs list to enable search over tags. Change-Id: Iccad928db0594ea14d4784dd164d1139a2599297
This commit is contained in:
@@ -74,6 +74,8 @@
|
||||
|
||||
- job:
|
||||
name: project-post
|
||||
tags:
|
||||
- post
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: static
|
||||
|
||||
@@ -683,6 +683,17 @@ class TestWeb(BaseTestWeb):
|
||||
variants = [{'parent': 'base'}]
|
||||
self.assertEqual(variants, job.get('variants'))
|
||||
|
||||
def test_jobs_list_tags(self):
|
||||
resp = self.get_url("api/tenant/tenant-one/jobs").json()
|
||||
|
||||
post_job = None
|
||||
for job in resp:
|
||||
if job['name'] == 'project-post':
|
||||
post_job = job
|
||||
break
|
||||
self.assertIsNotNone(post_job)
|
||||
self.assertEqual(['post'], post_job.get('tags'))
|
||||
|
||||
def test_web_job_noop(self):
|
||||
job = self.get_url("api/tenant/tenant-one/job/noop").json()
|
||||
self.assertEqual("noop", job[0]["name"])
|
||||
|
||||
Reference in New Issue
Block a user