summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/functest/functest-ci-jobs.yml35
-rw-r--r--jjb/joid/joid-ci-jobs.yml99
-rw-r--r--jjb/opnfv/slave-params.yml28
-rw-r--r--jjb/parser/parser.yml13
-rw-r--r--jjb/yardstick/yardstick-ci-jobs.yml70
-rw-r--r--utils/test/result_collection_api/resources/handlers.py4
-rw-r--r--utils/test/result_collection_api/result_collection_api.py25
-rw-r--r--utils/test/result_collection_api/tests/unit/test_base.py25
-rw-r--r--utils/test/result_collection_api/tests/unit/test_dashboard.py6
-rw-r--r--utils/test/result_collection_api/tests/unit/test_pod.py7
-rw-r--r--utils/test/result_collection_api/tests/unit/test_project.py2
-rw-r--r--utils/test/result_collection_api/tests/unit/test_result.py10
-rw-r--r--utils/test/result_collection_api/tests/unit/test_testcase.py4
-rw-r--r--utils/test/result_collection_api/tests/unit/test_version.py19
14 files changed, 189 insertions, 158 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 1ccaa1b10..24673612b 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -28,6 +28,7 @@
# that have been switched using labels for slaves
#--------------------------------
pod:
+# fuel CI PODs
- baremetal:
slave-label: fuel-baremetal
installer: fuel
@@ -50,6 +51,24 @@
slave-label: fuel-baremetal
installer: fuel
<<: *master
+
+# joid CI PODs
+ - baremetal:
+ slave-label: joid-baremetal
+ installer: joid
+ <<: *master
+ - virtual:
+ slave-label: joid-virtual
+ installer: joid
+ <<: *master
+ - baremetal:
+ slave-label: joid-baremetal
+ installer: joid
+ <<: *brahmaputra
+ - virtual:
+ slave-label: joid-virtual
+ installer: joid
+ <<: *brahmaputra
#--------------------------------
# Installers not using labels
# CI PODs
@@ -72,14 +91,6 @@
slave-label: '{pod}'
installer: compass
<<: *brahmaputra
- - intel-pod6:
- slave-label: '{pod}'
- installer: joid
- <<: *master
- - intel-pod5:
- slave-label: '{pod}'
- installer: joid
- <<: *brahmaputra
#--------------------------------
# None-CI PODs
#--------------------------------
@@ -99,10 +110,6 @@
slave-label: '{pod}'
installer: compass
<<: *master
- - virtual:
- slave-label: '{pod}'
- installer: joid
- <<: *master
- huawei-pod2:
slave-label: '{pod}'
installer: compass
@@ -131,10 +138,6 @@
slave-label: '{pod}'
installer: compass
<<: *brahmaputra
- - virtual:
- slave-label: '{pod}'
- installer: joid
- <<: *brahmaputra
#--------------------------------
testsuite:
diff --git a/jjb/joid/joid-ci-jobs.yml b/jjb/joid/joid-ci-jobs.yml
index 685e6fb6c..ddc6c1694 100644
--- a/jjb/joid/joid-ci-jobs.yml
+++ b/jjb/joid/joid-ci-jobs.yml
@@ -23,31 +23,38 @@
#--------------------------------
# POD, INSTALLER, AND BRANCH MAPPING
#--------------------------------
-# brahmaputra
+# CI PODs
#--------------------------------
pod:
- - intel-pod5:
- <<: *brahmaputra
- - orange-pod2:
+ - baremetal:
+ slave-label: joid-baremetal
+ <<: *master
+ - virtual:
+ slave-label: joid-virtual
+ <<: *master
+ - baremetal:
+ slave-label: joid-baremetal
<<: *brahmaputra
- virtual:
+ slave-label: joid-virtual
<<: *brahmaputra
#--------------------------------
-# master
+# None-CI PODs
#--------------------------------
- - intel-pod6:
- <<: *master
- orange-pod2:
+ slave-label: orange-pod2
+ <<: *brahmaputra
+ - orange-pod2:
+ slave-label: orange-pod2
<<: *master
- juniper-pod1:
- <<: *master
- - virtual:
+ slave-label: juniper-pod1
<<: *master
#--------------------------------
# new scenario descriptions
scenario:
- 'os-nosdn-nofeature-noha':
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ auto-trigger-name: 'daily-trigger-disabled'
- 'os-nosdn-nofeature-ha':
auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l2-nofeature-ha':
@@ -55,13 +62,13 @@
- 'os-onos-nofeature-ha':
auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l2-nofeature-noha':
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ auto-trigger-name: 'daily-trigger-disabled'
- 'os-onos-nofeature-noha':
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ auto-trigger-name: 'daily-trigger-disabled'
- 'os-ocl-nofeature-ha':
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ auto-trigger-name: 'daily-trigger-disabled'
- 'os-ocl-nofeature-noha':
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ auto-trigger-name: 'daily-trigger-disabled'
jobs:
- 'joid-{scenario}-{pod}-daily-{stream}'
@@ -78,7 +85,7 @@
properties:
- throttle:
enabled: true
- max-total: 1
+ max-total: 4
max-per-node: 1
- build-blocker:
use-build-blocker: true
@@ -96,7 +103,7 @@
- project-parameter:
project: '{project}'
- '{installer}-defaults'
- - '{pod}-defaults':
+ - '{slave-label}-defaults':
installer: '{installer}'
- string:
name: DEPLOY_SCENARIO
@@ -141,7 +148,7 @@
properties:
- throttle:
enabled: true
- max-total: 1
+ max-total: 4
max-per-node: 1
- build-blocker:
use-build-blocker: true
@@ -159,7 +166,7 @@
- project-parameter:
project: '{project}'
- '{installer}-defaults'
- - '{pod}-defaults':
+ - '{slave-label}-defaults':
installer: '{installer}'
- string:
name: DEPLOY_SCENARIO
@@ -194,13 +201,13 @@
########################
# os-nosdn-nofeature-ha trigger - branch: master
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-intel-pod5-master-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-baremetal-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-intel-pod6-master-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-virtual-master-trigger'
triggers:
- - timed: '#0 2 * * *'
+ - timed: ''
- trigger:
name: 'joid-os-nosdn-nofeature-ha-orange-pod2-master-trigger'
triggers:
@@ -209,17 +216,14 @@
name: 'joid-os-nosdn-nofeature-ha-juniper-pod1-master-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'joid-os-nosdn-nofeature-ha-virtual-master-trigger'
- triggers:
- - timed: ''
+
# os-nosdn-nofeature-ha trigger - branch: stable/brahmaputra
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-intel-pod5-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-baremetal-brahmaputra-trigger'
triggers:
- timed: '0 2 * * *'
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-intel-pod6-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-virtual-brahmaputra-trigger'
triggers:
- timed: ''
- trigger:
@@ -230,21 +234,16 @@
name: 'joid-os-nosdn-nofeature-ha-juniper-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'joid-os-nosdn-nofeature-ha-virtual-brahmaputra-trigger'
- triggers:
- - timed: ''
-
# os-odl_l2-nofeature-ha trigger - branch: master
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-intel-pod5-master-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-baremetal-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-intel-pod6-master-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-virtual-master-trigger'
triggers:
- - timed: '#0 10 * * *'
+ - timed: ''
- trigger:
name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-master-trigger'
triggers:
@@ -253,18 +252,14 @@
name: 'joid-os-odl_l2-nofeature-ha-juniper-pod1-master-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-virtual-master-trigger'
- triggers:
- - timed: ''
# os-odl_l2-nofeature-ha trigger - branch: stable/brahmaputra
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-intel-pod5-brahmaputra-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-baremetal-brahmaputra-trigger'
triggers:
- timed: '0 10 * * *'
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-intel-pod6-brahmaputra-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-virtual-brahmaputra-trigger'
triggers:
- timed: ''
- trigger:
@@ -275,20 +270,16 @@
name: 'joid-os-odl_l2-nofeature-ha-juniper-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-virtual-brahmaputra-trigger'
- triggers:
- - timed: ''
# os-onos-nofeature-ha trigger - branch: master
- trigger:
- name: 'joid-os-onos-nofeature-ha-intel-pod5-master-trigger'
+ name: 'joid-os-onos-nofeature-ha-baremetal-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-onos-nofeature-ha-intel-pod6-master-trigger'
+ name: 'joid-os-onos-nofeature-ha-virtual-master-trigger'
triggers:
- - timed: '#0 18 * * *'
+ - timed: ''
- trigger:
name: 'joid-os-onos-nofeature-ha-orange-pod2-master-trigger'
triggers:
@@ -297,18 +288,14 @@
name: 'joid-os-onos-nofeature-ha-juniper-pod1-master-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'joid-os-onos-nofeature-ha-virtual-master-trigger'
- triggers:
- - timed: ''
# os-onos-nofeature-ha trigger - branch: stable/brahmaputra
- trigger:
- name: 'joid-os-onos-nofeature-ha-intel-pod5-brahmaputra-trigger'
+ name: 'joid-os-onos-nofeature-ha-baremetal-brahmaputra-trigger'
triggers:
- timed: '0 18 * * *'
- trigger:
- name: 'joid-os-onos-nofeature-ha-intel-pod6-brahmaputra-trigger'
+ name: 'joid-os-onos-nofeature-ha-virtual-brahmaputra-trigger'
triggers:
- timed: ''
- trigger:
@@ -319,7 +306,3 @@
name: 'joid-os-onos-nofeature-ha-juniper-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'joid-os-onos-nofeature-ha-virtual-brahmaputra-trigger'
- triggers:
- - timed: ''
diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml
index ddeeaab09..d89af419a 100644
--- a/jjb/opnfv/slave-params.yml
+++ b/jjb/opnfv/slave-params.yml
@@ -19,6 +19,34 @@
default: https://gerrit.opnfv.org/gerrit/$PROJECT
description: 'Git URL to use on this Jenkins Slave'
- parameter:
+ name: 'joid-baremetal-defaults'
+ parameters:
+ - label:
+ name: SLAVE_LABEL
+ default: 'joid-baremetal'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+ - string:
+ name: CEPH_DISKS
+ default: /srv
+ description: "Disks to use by ceph (comma separated list)"
+ - string:
+ name: EXTERNAL_NETWORK
+ default: ext-net;flat;10.5.15.5;10.5.15.250;10.5.15.254;10.5.15.0/24
+ description: "External network to create for pod5 (name;type;first ip;last ip; gateway;network)"
+- parameter:
+ name: 'joid-virtual-defaults'
+ parameters:
+ - label:
+ name: SLAVE_LABEL
+ default: 'joid-virtual'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+- parameter:
name: 'lf-pod1-defaults'
parameters:
- node:
diff --git a/jjb/parser/parser.yml b/jjb/parser/parser.yml
index 5e603f026..2ab1af833 100644
--- a/jjb/parser/parser.yml
+++ b/jjb/parser/parser.yml
@@ -58,4 +58,15 @@
builders:
- shell: |
- echo "Nothing to verify!"
+ #/bin/bash
+ set -o errexit
+ set -o pipefail
+ set -o xtrace
+ export PATH=$PATH:/usr/local/bin/
+
+ # pep8 check parser/tosca2heat/tosca-parser
+ echo "Running tox -e pep8 on tosca2heat ..."
+ cd $WORKSPACE/parser/tosca2heat/tosca-parser
+ tox -e pep8
+ cd $WORKSPACE/parser/tosca2heat/heat-translator
+ tox -e pep8
diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml
index c6630d7bc..3d59e61ce 100644
--- a/jjb/yardstick/yardstick-ci-jobs.yml
+++ b/jjb/yardstick/yardstick-ci-jobs.yml
@@ -28,6 +28,7 @@
# that have been switched using labels for slaves
#--------------------------------
pod:
+# fuel CI PODs
- baremetal:
slave-label: fuel-baremetal
installer: fuel
@@ -55,6 +56,28 @@
installer: fuel
auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
<<: *master
+
+# joid CI PODs
+ - baremetal:
+ slave-label: joid-baremetal
+ installer: joid
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ <<: *master
+ - virtual:
+ slave-label: joid-virtual
+ installer: joid
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ <<: *master
+ - baremetal:
+ slave-label: joid-baremetal
+ installer: joid
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ <<: *brahmaputra
+ - virtual:
+ slave-label: joid-virtual
+ installer: joid
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ <<: *brahmaputra
#--------------------------------
# Installers not using labels
# CI PODs
@@ -81,16 +104,6 @@
installer: compass
auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
<<: *brahmaputra
- - intel-pod6:
- slave-label: '{pod}'
- installer: joid
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
- <<: *master
- - intel-pod5:
- slave-label: '{pod}'
- installer: joid
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
- <<: *brahmaputra
#--------------------------------
# None-CI PODs
#--------------------------------
@@ -137,21 +150,11 @@
installer: compass
auto-trigger-name: 'yardstick-daily-huawei-pod4-trigger'
<<: *master
- - virtual:
- slave-label: '{pod}'
- installer: joid
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
- <<: *master
- huawei-virtual:
slave-label: '{pod}'
installer: compass
auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
<<: *brahmaputra
- - virtual:
- slave-label: '{pod}'
- installer: joid
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
- <<: *brahmaputra
#--------------------------------
testsuite:
- 'daily'
@@ -251,45 +254,42 @@
# parameter macros
########################
- parameter:
- name: 'yardstick-params-intel-pod5'
+ name: 'yardstick-params-fuel-baremetal'
parameters:
- string:
name: YARDSTICK_DB_BACKEND
default: '-i 104.197.68.199:8086'
description: 'Arguments to use in order to choose the backend DB'
-
- parameter:
- name: 'yardstick-params-intel-pod6'
+ name: 'yardstick-params-fuel-virtual'
parameters:
- string:
name: YARDSTICK_DB_BACKEND
- default: '-i 104.197.68.199:8086'
+ default: ''
description: 'Arguments to use in order to choose the backend DB'
-
- parameter:
- name: 'yardstick-params-intel-pod8'
+ name: 'yardstick-params-joid-baremetal'
parameters:
- string:
name: YARDSTICK_DB_BACKEND
- default: ''
+ default: '-i 104.197.68.199:8086'
description: 'Arguments to use in order to choose the backend DB'
- parameter:
- name: 'yardstick-params-lf-pod1'
+ name: 'yardstick-params-joid-virtual'
parameters:
- string:
name: YARDSTICK_DB_BACKEND
- default: '-i 104.197.68.199:8086'
+ default: ''
description: 'Arguments to use in order to choose the backend DB'
-
- parameter:
- name: 'yardstick-params-lf-pod2'
+ name: 'yardstick-params-intel-pod8'
parameters:
- string:
name: YARDSTICK_DB_BACKEND
- default: '-i 104.197.68.199:8086'
+ default: ''
description: 'Arguments to use in order to choose the backend DB'
- parameter:
- name: 'yardstick-params-fuel-baremetal'
+ name: 'yardstick-params-lf-pod1'
parameters:
- string:
name: YARDSTICK_DB_BACKEND
@@ -297,11 +297,11 @@
description: 'Arguments to use in order to choose the backend DB'
- parameter:
- name: 'yardstick-params-fuel-virtual'
+ name: 'yardstick-params-lf-pod2'
parameters:
- string:
name: YARDSTICK_DB_BACKEND
- default: ''
+ default: '-i 104.197.68.199:8086'
description: 'Arguments to use in order to choose the backend DB'
- parameter:
diff --git a/utils/test/result_collection_api/resources/handlers.py b/utils/test/result_collection_api/resources/handlers.py
index 8cc68e912..435334341 100644
--- a/utils/test/result_collection_api/resources/handlers.py
+++ b/utils/test/result_collection_api/resources/handlers.py
@@ -73,10 +73,10 @@ class GenericApiHandler(RequestHandler):
return CreateResponse(href=href).format()
-class VersionHandler(RequestHandler):
+class VersionHandler(GenericApiHandler):
""" Display a message for the API version """
def get(self):
- self.write("Collection of test result API, v1")
+ self.finish_request([{'v1': 'basics'}])
class PodHandler(GenericApiHandler):
diff --git a/utils/test/result_collection_api/result_collection_api.py b/utils/test/result_collection_api/result_collection_api.py
index 704d6075c..97aa58c77 100644
--- a/utils/test/result_collection_api/result_collection_api.py
+++ b/utils/test/result_collection_api/result_collection_api.py
@@ -54,25 +54,25 @@ def make_app():
return tornado.web.Application(
[
# GET /version => GET API version
- (r"/version", VersionHandler),
+ (r"/versions", VersionHandler),
# few examples:
# GET /pods => Get all pods
# GET /pods/1 => Get details on POD 1
- (r"/pods", PodHandler),
- (r"/pods/([^/]+)", PodHandler),
+ (r"/api/v1/pods", PodHandler),
+ (r"/api/v1/pods/([^/]+)", PodHandler),
# few examples:
# GET /projects
# GET /projects/yardstick
- (r"/projects", ProjectHandler),
- (r"/projects/([^/]+)", ProjectHandler),
+ (r"/api/v1/projects", ProjectHandler),
+ (r"/api/v1/projects/([^/]+)", ProjectHandler),
# few examples
# GET /projects/qtip/cases => Get cases for qtip
#
- (r"/projects/([^/]+)/cases", TestcaseHandler),
- (r"/projects/([^/]+)/cases/([^/]+)", TestcaseHandler),
+ (r"/api/v1/projects/([^/]+)/cases", TestcaseHandler),
+ (r"/api/v1/projects/([^/]+)/cases/([^/]+)", TestcaseHandler),
# (r"/test_cases/([^/]+)", TestCasesHandler),
# new path to avoid a long depth
@@ -81,18 +81,17 @@ def make_app():
# POST /results =>
# Push results with mandatory request payload parameters
# (project, case, and pod)
- (r"/results", TestResultsHandler),
- (r"/results([^/]*)", TestResultsHandler),
- (r"/results/([^/]*)", TestResultsHandler),
+ (r"/api/v1/results", TestResultsHandler),
+ (r"/api/v1/results([^/]*)", TestResultsHandler),
+ (r"/api/v1/results/([^/]*)", TestResultsHandler),
# Method to manage Dashboard ready results
# GET /dashboard?project=functest&case=vPing&pod=opnfv-jump2
# => get results in dasboard ready format
# get /dashboard
# => get the list of project with dashboard ready results
- (r"/dashboard", DashboardHandler),
- (r"/dashboard([^/]*)", DashboardHandler),
- (r"/dashboard/([^/]*)", DashboardHandler),
+ (r"/dashboard/v1/results", DashboardHandler),
+ (r"/dashboard/v1/results([^/]*)", DashboardHandler),
],
db=db,
debug=CONF.api_debug_on,
diff --git a/utils/test/result_collection_api/tests/unit/test_base.py b/utils/test/result_collection_api/tests/unit/test_base.py
index a06cba9fb..99b1de286 100644
--- a/utils/test/result_collection_api/tests/unit/test_base.py
+++ b/utils/test/result_collection_api/tests/unit/test_base.py
@@ -25,19 +25,18 @@ class TestBase(AsyncHTTPTestCase):
def get_app(self):
return Application(
[
- (r"/version", VersionHandler),
- (r"/pods", PodHandler),
- (r"/pods/([^/]+)", PodHandler),
- (r"/projects", ProjectHandler),
- (r"/projects/([^/]+)", ProjectHandler),
- (r"/projects/([^/]+)/cases", TestcaseHandler),
- (r"/projects/([^/]+)/cases/([^/]+)", TestcaseHandler),
- (r"/results", TestResultsHandler),
- (r"/results([^/]*)", TestResultsHandler),
- (r"/results/([^/]*)", TestResultsHandler),
- (r"/dashboard", DashboardHandler),
- (r"/dashboard([^/]*)", DashboardHandler),
- (r"/dashboard/([^/]*)", DashboardHandler),
+ (r"/versions", VersionHandler),
+ (r"/api/v1/pods", PodHandler),
+ (r"/api/v1/pods/([^/]+)", PodHandler),
+ (r"/api/v1/projects", ProjectHandler),
+ (r"/api/v1/projects/([^/]+)", ProjectHandler),
+ (r"/api/v1/projects/([^/]+)/cases", TestcaseHandler),
+ (r"/api/v1/projects/([^/]+)/cases/([^/]+)", TestcaseHandler),
+ (r"/api/v1/results", TestResultsHandler),
+ (r"/api/v1/results([^/]*)", TestResultsHandler),
+ (r"/api/v1/results/([^/]*)", TestResultsHandler),
+ (r"/dashboard/v1/results", DashboardHandler),
+ (r"/dashboard/v1/results([^/]*)", DashboardHandler),
],
db=fake_pymongo,
debug=True,
diff --git a/utils/test/result_collection_api/tests/unit/test_dashboard.py b/utils/test/result_collection_api/tests/unit/test_dashboard.py
index 1e0d22b91..5c3f92492 100644
--- a/utils/test/result_collection_api/tests/unit/test_dashboard.py
+++ b/utils/test/result_collection_api/tests/unit/test_dashboard.py
@@ -9,9 +9,9 @@ __author__ = '__serena__'
class TestDashboardBase(TestResultBase):
def setUp(self):
super(TestDashboardBase, self).setUp()
- self.basePath = '/dashboard'
- self.create_help('/results', self.req_d)
- self.create_help('/results', self.req_d)
+ self.basePath = '/dashboard/v1/results'
+ self.create_help('/api/v1/results', self.req_d)
+ self.create_help('/api/v1/results', self.req_d)
self.list_res = None
diff --git a/utils/test/result_collection_api/tests/unit/test_pod.py b/utils/test/result_collection_api/tests/unit/test_pod.py
index 958a38f76..d7f4c3a63 100644
--- a/utils/test/result_collection_api/tests/unit/test_pod.py
+++ b/utils/test/result_collection_api/tests/unit/test_pod.py
@@ -14,7 +14,7 @@ class TestPodBase(TestBase):
self.req_e = PodCreateRequest('zte-2', 'metal', 'zte pod 2')
self.get_res = Pod
self.list_res = Pods
- self.basePath = '/pods'
+ self.basePath = '/api/v1/pods'
def assert_get_body(self, pod, req=None):
if not req:
@@ -43,11 +43,6 @@ class TestPodCreate(TestPodBase):
self.assertEqual(code, HTTP_FORBIDDEN)
self.assertIn('already exists', body)
- def _assertMeta(self, meta, success):
- self.assertEqual(meta.success, success)
- if success:
- self.assertEqual(meta.uri, '/pods/{}'.format(self.req_d.name))
-
class TestPodGet(TestPodBase):
def test_notExist(self):
diff --git a/utils/test/result_collection_api/tests/unit/test_project.py b/utils/test/result_collection_api/tests/unit/test_project.py
index 6ce21db24..c38078098 100644
--- a/utils/test/result_collection_api/tests/unit/test_project.py
+++ b/utils/test/result_collection_api/tests/unit/test_project.py
@@ -14,7 +14,7 @@ class TestProjectBase(TestBase):
self.get_res = Project
self.list_res = Projects
self.update_res = Project
- self.basePath = '/projects'
+ self.basePath = '/api/v1/projects'
def assert_body(self, project, req=None):
if not req:
diff --git a/utils/test/result_collection_api/tests/unit/test_result.py b/utils/test/result_collection_api/tests/unit/test_result.py
index 9e27e3c3c..9c5093ed1 100644
--- a/utils/test/result_collection_api/tests/unit/test_result.py
+++ b/utils/test/result_collection_api/tests/unit/test_result.py
@@ -67,15 +67,17 @@ class TestResultBase(TestBase):
trust_indicator=self.trust_indicator)
self.get_res = TestResult
self.list_res = TestResults
- self.basePath = '/results'
+ self.basePath = '/api/v1/results'
self.req_pod = PodCreateRequest(self.pod, 'metal', 'zte pod 1')
self.req_project = ProjectCreateRequest(self.project, 'vping test')
self.req_testcase = TestcaseCreateRequest('/cases/vping',
self.case,
'vping-ssh test')
- self.create_help('/pods', self.req_pod)
- self.create_help('/projects', self.req_project)
- self.create_help('/projects/%s/cases', self.req_testcase, self.project)
+ self.create_help('/api/v1/pods', self.req_pod)
+ self.create_help('/api/v1/projects', self.req_project)
+ self.create_help('/api/v1/projects/%s/cases',
+ self.req_testcase,
+ self.project)
def assert_res(self, code, result):
self.assertEqual(code, HTTP_OK)
diff --git a/utils/test/result_collection_api/tests/unit/test_testcase.py b/utils/test/result_collection_api/tests/unit/test_testcase.py
index e44c0b4b6..712a4e78c 100644
--- a/utils/test/result_collection_api/tests/unit/test_testcase.py
+++ b/utils/test/result_collection_api/tests/unit/test_testcase.py
@@ -29,7 +29,7 @@ class TestCaseBase(TestBase):
self.get_res = Testcase
self.list_res = Testcases
self.update_res = Testcase
- self.basePath = '/projects/%s/cases'
+ self.basePath = '/api/v1/projects/%s/cases'
self.create_project()
def assert_body(self, case, req=None):
@@ -52,7 +52,7 @@ class TestCaseBase(TestBase):
def create_project(self):
req_p = ProjectCreateRequest('functest', 'vping-ssh test')
- self.create_help('/projects', req_p)
+ self.create_help('/api/v1/projects', req_p)
self.project = req_p.name
def create_d(self):
diff --git a/utils/test/result_collection_api/tests/unit/test_version.py b/utils/test/result_collection_api/tests/unit/test_version.py
index 918f2f052..a58cd5629 100644
--- a/utils/test/result_collection_api/tests/unit/test_version.py
+++ b/utils/test/result_collection_api/tests/unit/test_version.py
@@ -1,3 +1,4 @@
+import json
import unittest
from test_base import TestBase
@@ -5,10 +6,20 @@ from test_base import TestBase
__author__ = 'serena'
-class TestVersion(TestBase):
- def test_get_version(self):
- response = self.fetch('/version')
- self.assertEqual(response.code, 200)
+class TestVersionbBase(TestBase):
+ def setUp(self):
+ super(TestVersionbBase, self).setUp()
+ self.list_res = None
+ self.basePath = '/versions'
+
+
+class TestVersion(TestVersionbBase):
+ def test_success(self):
+ code, body = self.get()
+ self.assertEqual(200, code)
+ json_body = json.loads(body)
+ self.assertEqual(len(json_body), 1)
+ self.assertEqual('basics', json_body[0].get('v1'))
if __name__ == '__main__':
unittest.main()