diff options
author | Rodolfo Carvalho <rhcarvalho@gmail.com> | 2017-02-19 22:05:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-19 22:05:59 +0100 |
commit | 3ba41f17f7ea7d05a291a59f4d22b31ba159579b (patch) | |
tree | bc73cffbf701af3f8a2695bc26fc634f7f669018 | |
parent | 4653f96dd2612c9d4d580637a7f99d41fad8b46e (diff) | |
parent | fd7c9750cc344ae48abfc48c13f1b1d84ef077b8 (diff) | |
download | openshift-3ba41f17f7ea7d05a291a59f4d22b31ba159579b.tar.gz openshift-3ba41f17f7ea7d05a291a59f4d22b31ba159579b.tar.bz2 openshift-3ba41f17f7ea7d05a291a59f4d22b31ba159579b.tar.xz openshift-3ba41f17f7ea7d05a291a59f4d22b31ba159579b.zip |
Merge pull request #3414 from rhcarvalho/fix-missing-unit-tests-ci
Fix missing unit tests in CI
-rw-r--r-- | requirements.txt | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oadm_manage_node.py (renamed from roles/lib_openshift/src/test/unit/oadm_manage_node.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_env.py (renamed from roles/lib_openshift/src/test/unit/oc_env.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_label.py (renamed from roles/lib_openshift/src/test/unit/oc_label.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_process.py (renamed from roles/lib_openshift/src/test/unit/oc_process.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_route.py (renamed from roles/lib_openshift/src/test/unit/oc_route.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_scale.py (renamed from roles/lib_openshift/src/test/unit/oc_scale.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_secret.py (renamed from roles/lib_openshift/src/test/unit/oc_secret.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_service.py (renamed from roles/lib_openshift/src/test/unit/oc_service.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_serviceaccount.py (renamed from roles/lib_openshift/src/test/unit/oc_serviceaccount.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_serviceaccount_secret.py (renamed from roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_openshift/src/test/unit/test_oc_version.py (renamed from roles/lib_openshift/src/test/unit/oc_version.py) | 0 | ||||
-rw-r--r-- | roles/lib_utils/library/repoquery.py | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_utils/src/test/unit/test_repoquery.py (renamed from roles/lib_utils/src/test/unit/repoquery.py) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | roles/lib_utils/src/test/unit/test_yedit.py (renamed from roles/lib_utils/src/test/unit/yedit_test.py) | 2 | ||||
-rw-r--r-- | setup.cfg | 7 | ||||
-rw-r--r-- | test-requirements.txt | 1 |
17 files changed, 9 insertions, 4 deletions
diff --git a/requirements.txt b/requirements.txt index 8f47033f8..5a6a161cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ ansible>=2.2 six pyOpenSSL PyYAML +ruamel.yaml diff --git a/roles/lib_openshift/src/test/unit/oadm_manage_node.py b/roles/lib_openshift/src/test/unit/test_oadm_manage_node.py index b0786dfac..b0786dfac 100755..100644 --- a/roles/lib_openshift/src/test/unit/oadm_manage_node.py +++ b/roles/lib_openshift/src/test/unit/test_oadm_manage_node.py diff --git a/roles/lib_openshift/src/test/unit/oc_env.py b/roles/lib_openshift/src/test/unit/test_oc_env.py index 15bd7e464..15bd7e464 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_env.py +++ b/roles/lib_openshift/src/test/unit/test_oc_env.py diff --git a/roles/lib_openshift/src/test/unit/oc_label.py b/roles/lib_openshift/src/test/unit/test_oc_label.py index 3176987b0..3176987b0 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_label.py +++ b/roles/lib_openshift/src/test/unit/test_oc_label.py diff --git a/roles/lib_openshift/src/test/unit/oc_process.py b/roles/lib_openshift/src/test/unit/test_oc_process.py index 450ff7071..450ff7071 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_process.py +++ b/roles/lib_openshift/src/test/unit/test_oc_process.py diff --git a/roles/lib_openshift/src/test/unit/oc_route.py b/roles/lib_openshift/src/test/unit/test_oc_route.py index 361b61f4b..361b61f4b 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_route.py +++ b/roles/lib_openshift/src/test/unit/test_oc_route.py diff --git a/roles/lib_openshift/src/test/unit/oc_scale.py b/roles/lib_openshift/src/test/unit/test_oc_scale.py index f15eb164d..f15eb164d 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_scale.py +++ b/roles/lib_openshift/src/test/unit/test_oc_scale.py diff --git a/roles/lib_openshift/src/test/unit/oc_secret.py b/roles/lib_openshift/src/test/unit/test_oc_secret.py index 645aac82b..645aac82b 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_secret.py +++ b/roles/lib_openshift/src/test/unit/test_oc_secret.py diff --git a/roles/lib_openshift/src/test/unit/oc_service.py b/roles/lib_openshift/src/test/unit/test_oc_service.py index 4a845e9f3..4a845e9f3 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_service.py +++ b/roles/lib_openshift/src/test/unit/test_oc_service.py diff --git a/roles/lib_openshift/src/test/unit/oc_serviceaccount.py b/roles/lib_openshift/src/test/unit/test_oc_serviceaccount.py index 256b569eb..256b569eb 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_serviceaccount.py +++ b/roles/lib_openshift/src/test/unit/test_oc_serviceaccount.py diff --git a/roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py b/roles/lib_openshift/src/test/unit/test_oc_serviceaccount_secret.py index 213c581aa..213c581aa 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py +++ b/roles/lib_openshift/src/test/unit/test_oc_serviceaccount_secret.py diff --git a/roles/lib_openshift/src/test/unit/oc_version.py b/roles/lib_openshift/src/test/unit/test_oc_version.py index 67dea415b..67dea415b 100755..100644 --- a/roles/lib_openshift/src/test/unit/oc_version.py +++ b/roles/lib_openshift/src/test/unit/test_oc_version.py diff --git a/roles/lib_utils/library/repoquery.py b/roles/lib_utils/library/repoquery.py index cc7aa04fd..f31c8911b 100644 --- a/roles/lib_utils/library/repoquery.py +++ b/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: diff --git a/roles/lib_utils/src/test/unit/repoquery.py b/roles/lib_utils/src/test/unit/test_repoquery.py index c487ab254..c487ab254 100755..100644 --- a/roles/lib_utils/src/test/unit/repoquery.py +++ b/roles/lib_utils/src/test/unit/test_repoquery.py diff --git a/roles/lib_utils/src/test/unit/yedit_test.py b/roles/lib_utils/src/test/unit/test_yedit.py index 2793c5c1a..ed07ac96e 100755..100644 --- a/roles/lib_utils/src/test/unit/yedit_test.py +++ b/roles/lib_utils/src/test/unit/test_yedit.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,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 diff --git a/test-requirements.txt b/test-requirements.txt index 2ee1e657d..8bfc1b594 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,3 +9,4 @@ PyYAML yamllint nose coverage +mock |