Add test case tempest_custom into the local database 47/34647/1
authorxudan <xudan16@huawei.com>
Fri, 12 May 2017 01:54:16 +0000 (21:54 -0400)
committerxudan <xudan16@huawei.com>
Fri, 12 May 2017 01:54:16 +0000 (21:54 -0400)
JIRA: DOVETAIL-429

Test case tempst_custom is not in the initial local database. Add this test case
into local database.

Change-Id: I53d3f6ebdde7ff680e33faf8296551d81f3c0496
Signed-off-by: xudan <xudan16@huawei.com>
dovetail/utils/local_db/init_db.py

index 246139c..2aac6fc 100644 (file)
@@ -60,6 +60,7 @@ def cases():
                     post(target, c)
             except:
                 print("useless data")
+    add_case("functest", "tempest_custom")
 
 
 def add_pod(name, mode):
@@ -74,6 +75,15 @@ def add_pod(name, mode):
     post(pod_url, data)
 
 
+def add_case(project, case):
+    data = {
+        "project_name": project,
+        "name": case,
+    }
+    case_url = '{}/projects/{}/cases'.format(target_url, project)
+    post(case_url, data)
+
+
 if __name__ == '__main__':
     pod()
     project()