testapi: bugfix of tox 59/37459/7
authorMatthewLi <lijun_1203@126.com>
Fri, 14 Jul 2017 04:30:50 +0000 (00:30 -0400)
committerMatthewLi <lijun_1203@126.com>
Fri, 14 Jul 2017 06:32:56 +0000 (02:32 -0400)
error log

https://gerrit.opnfv.org/gerrit/#/c/37053/
https://build.opnfv.org/ci/job/testapi-verify-master/220/console

Change-Id: Id278edad06c2852c662392d75fd3cf4041b03451
Signed-off-by: MatthewLi <lijun_1203@126.com>
jjb/releng/automate.yml
utils/test/testapi/htmlize/htmlize.py
utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py
utils/test/testapi/opnfv_testapi/tests/unit/resources/test_project.py
utils/test/testapi/opnfv_testapi/tests/unit/resources/test_token.py
utils/test/testapi/requirements.txt
utils/test/testapi/setup.py
utils/test/testapi/tox.ini
utils/test/testapi/update/templates/backup_mongodb.py
utils/test/testapi/update/templates/update_mongodb.py

index db67264..4f6044b 100644 (file)
@@ -84,7 +84,9 @@
         - shell: |
             cd ./utils/test/{module}/
             tox
-            cp *.xml $WORKSPACE
+            if [ -e *.xml ];then
+                cp *.xml $WORKSPACE
+            fi
 
     publishers:
         - publish-coverage
index 4576d9b..da6a6cf 100644 (file)
@@ -33,6 +33,7 @@ def main(args):
     else:
         exit(1)
 
+
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='Create \
                                       Swagger Spec documentation')
index 8e0ae40..cb4f1d9 100644 (file)
@@ -85,5 +85,6 @@ class TestPodGet(TestPodBase):
             else:
                 self.assert_get_body(pod, self.req_e)
 
+
 if __name__ == '__main__':
     unittest.main()
index 5a2ce75..0622ba8 100644 (file)
@@ -132,5 +132,6 @@ class TestProjectDelete(TestProjectBase):
         code, body = self.get(self.req_d.name)
         self.assertEqual(code, httplib.NOT_FOUND)
 
+
 if __name__ == '__main__':
     unittest.main()
index c9d4b72..b4ba887 100644 (file)
@@ -109,5 +109,6 @@ class TestTokenUpdateProject(TestToken):
     def _update_success(self, request, body):
         self.assertIn(request.name, body)
 
+
 if __name__ == '__main__':
     unittest.main()
index 955ffc8..d2a45dc 100644 (file)
@@ -2,7 +2,7 @@
 # of appearance. Changing the order has an impact on the overall integration
 # process, which may cause wedges in the gate later.
 
-pbr>=1.6
+pbr==2.0.0
 setuptools>=16.0
 tornado>=3.1,<=4.3
 epydoc>=0.3.1
index 15dda96..f689cb3 100644 (file)
@@ -3,7 +3,11 @@ import setuptools
 
 __author__ = 'serena'
 
+try:
+    import multiprocessing  # noqa
+except ImportError:
+    pass
 
 setuptools.setup(
-    setup_requires=['pbr>=1.8'],
+    setup_requires=['pbr==2.0.0'],
     pbr=True)
index 81c9dfa..65f5fb6 100644 (file)
@@ -4,7 +4,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py27,pep8
+envlist = pep8,py27
 skipsdist = True
 sitepackages = True
 
@@ -17,7 +17,6 @@ deps =
 commands=
   py.test \
     --basetemp={envtmpdir} \
-    --cov \
     {posargs}
 setenv=
   HOME = {envtmpdir}
index 7e0dd55..9c24377 100644 (file)
@@ -40,5 +40,6 @@ def backup(args):
     cmd = ['mongodump', '-o', '%s' % out]
     execute(cmd, args)
 
+
 if __name__ == '__main__':
     main(backup, parser)
index ba4334a..f759592 100644 (file)
@@ -85,5 +85,6 @@ def update(args):
     rename_fields(fields_old2New)
     rename_collections(collections_old2New)
 
+
 if __name__ == '__main__':
     main(update, parser)