Browse Source

Merge pull request #3414 from rhcarvalho/fix-missing-unit-tests-ci

Fix missing unit tests in CI
Rodolfo Carvalho 8 years ago
parent
commit
3ba41f17f7

+ 1 - 0
requirements.txt

@@ -2,3 +2,4 @@ ansible>=2.2
 six
 pyOpenSSL
 PyYAML
+ruamel.yaml

+ 0 - 0
roles/lib_openshift/src/test/unit/oadm_manage_node.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_env.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_label.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_process.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_route.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_scale.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_secret.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_service.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_serviceaccount.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py


+ 0 - 0
roles/lib_openshift/src/test/unit/oc_version.py


+ 1 - 1
roles/lib_utils/library/repoquery.py

@@ -477,7 +477,7 @@ class Repoquery(RepoqueryCLI):
         ''' Gather and present the versions of each package '''
 
         versions_dict = {}
-        versions_dict['available_versions_full'] = formatted_versions.keys()
+        versions_dict['available_versions_full'] = list(formatted_versions.keys())
 
         # set the match version, if called
         if self.match_version:

+ 0 - 0
roles/lib_utils/src/test/unit/repoquery.py


+ 1 - 1
roles/lib_utils/src/test/unit/yedit_test.py

@@ -256,7 +256,7 @@ class YeditTest(unittest.TestCase):
 
     def test_pop_list_item_2(self):
         '''test dict value with none value'''
-        z = range(10)
+        z = list(range(10))
         yed = Yedit(content=z, separator=':')
         yed.pop('', 5)
         z.pop(5)

+ 5 - 2
setup.cfg

@@ -5,12 +5,15 @@
 universal=1
 
 [nosetests]
-tests=roles/openshift_master_facts/test/, test/
+tests=roles/lib_openshift/src/test/unit,
+      roles/lib_utils/src/test/unit,
+      roles/openshift_master_facts/test,
+      test
 verbosity=2
 with-coverage=1
 cover-html=1
 cover-inclusive=1
-cover-min-percentage=70
+cover-min-percentage=25
 cover-erase=1
 detailed-errors=1
 cover-branches=1

+ 1 - 0
test-requirements.txt

@@ -9,3 +9,4 @@ PyYAML
 yamllint
 nose
 coverage
+mock