فهرست منبع

Fixed linting and configmap_name param

Kenny Woodson 8 سال پیش
والد
کامیت
bfaa7976a2
1فایلهای تغییر یافته به همراه7 افزوده شده و 5 حذف شده
  1. 7 5
      roles/lib_openshift/src/test/unit/test_oc_volume.py

+ 7 - 5
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')