summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-03-22 09:57:17 -0400
committerKenny Woodson <kwoodson@redhat.com>2017-03-22 09:57:17 -0400
commitbfaa7976a2e3090f1b942978f340b9ffbb6b222c (patch)
tree9598dc7d08bce956c518179eadf060906e0e6e2b /roles/lib_openshift
parentc7124d09eb19a0f20d8e60ccf43eccbedf1e8c29 (diff)
downloadopenshift-bfaa7976a2e3090f1b942978f340b9ffbb6b222c.tar.gz
openshift-bfaa7976a2e3090f1b942978f340b9ffbb6b222c.tar.bz2
openshift-bfaa7976a2e3090f1b942978f340b9ffbb6b222c.tar.xz
openshift-bfaa7976a2e3090f1b942978f340b9ffbb6b222c.zip
Fixed linting and configmap_name param
Diffstat (limited to 'roles/lib_openshift')
-rwxr-xr-xroles/lib_openshift/src/test/unit/test_oc_volume.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/roles/lib_openshift/src/test/unit/test_oc_volume.py b/roles/lib_openshift/src/test/unit/test_oc_volume.py
index 14f915c7e..d91e22bc7 100755
--- a/roles/lib_openshift/src/test/unit/test_oc_volume.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_volume.py
@@ -35,6 +35,7 @@ class OCVolumeTest(unittest.TestCase):
'mount_type': 'pvc',
'claim_name': 'testclaim',
'claim_size': '1G',
+ 'configmap_name': None,
'vol_name': 'test-volume',
'debug': False}
@@ -285,8 +286,9 @@ class OCVolumeTest(unittest.TestCase):
''' Testing a label list '''
params = copy.deepcopy(OCVolumeTest.params)
params.update({'mount_path': '/configmap',
- 'mount_type': 'configmap',
- 'vol_name': 'configtest'})
+ 'mount_type': 'configmap',
+ 'configmap_name': 'configtest',
+ 'vol_name': 'configvol'})
dc = '''{
"kind": "DeploymentConfig",
@@ -468,7 +470,7 @@ class OCVolumeTest(unittest.TestCase):
}
},
{
- "name": "configtest",
+ "name": "configvol",
"configMap": {
"name": "configtest"
}
@@ -485,7 +487,7 @@ class OCVolumeTest(unittest.TestCase):
"mountPath": "/secrets"
},
{
- "name": "configtest",
+ "name": "configvol",
"mountPath": "/configmap"
}
],
@@ -520,7 +522,7 @@ class OCVolumeTest(unittest.TestCase):
results = OCVolume.run_ansible(params, False)
self.assertTrue(results['changed'])
- self.assertTrue(results['results']['results'][-1]['name'] == 'configtest')
+ self.assertTrue(results['results']['results'][-1]['name'] == 'configvol')
@unittest.skipIf(six.PY3, 'py2 test only')
@mock.patch('os.path.exists')