Bläddra i källkod

Clean up test files

They are not executable anymore, and tests are now meant to be run
through pytest.
Rodolfo Carvalho 8 år sedan
förälder
incheckning
dace1a426b

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oadm_manage_node.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oadm_manage_node
 '''
-# To run
-# python -m unittest version
-#
-# .
-# Ran 2 tests in 0.001s
-#
-# OK
 
 import os
 import six
@@ -291,7 +283,3 @@ class ManageNodeTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_env.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc_env
 '''
-# To run:
-# ./oc_env.py
-#
-# .
-# Ran 1 test in 0.002s
-#
-# OK
 
 import os
 import six
@@ -562,7 +554,3 @@ class OCEnvTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_label.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc label
 '''
-# To run
-# python -m unittest version
-#
-# .
-# Ran 1 test in 0.597s
-#
-# OK
 
 import os
 import six
@@ -299,7 +291,3 @@ class OCLabelTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 13
roles/lib_openshift/src/test/unit/test_oc_objectvalidator.py

@@ -1,15 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc_objectvalidator
 '''
-# To run
-# ./oc_objectvalidator.py.py
-#
-# ....
-# ----------------------------------------------------------------------
-# Ran 4 tests in 0.002s
-#
-# OK
 
 import os
 import sys
@@ -910,7 +901,3 @@ class OCObjectValidatorTest(unittest.TestCase):
             mock.call(['oc', 'get', 'netnamespace', '-o', 'json', '-n', 'default'], None),
             mock.call(['oc', 'get', 'namespace', '-o', 'json', '-n', 'default'], None),
         ])
-
-
-if __name__ == '__main__':
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_process.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc process
 '''
-# To run
-# python -m unittest version
-#
-# .
-# Ran 1 test in 0.597s
-#
-# OK
 
 import os
 import six
@@ -586,7 +578,3 @@ class OCProcessTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_project.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc project
 '''
-# To run:
-# ./oc_secret.py
-#
-# .
-# Ran 1 test in 0.002s
-#
-# OK
 
 import os
 import sys
@@ -124,7 +116,3 @@ class OCProjectTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_route.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc route
 '''
-# To run:
-# ./oc_serviceaccount.py
-#
-# .
-# Ran 1 test in 0.002s
-#
-# OK
 
 import os
 import six
@@ -381,7 +373,3 @@ metadata:
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_scale.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc scale
 '''
-# To run
-# python -m unittest version
-#
-# .
-# Ran 1 test in 0.597s
-#
-# OK
 
 import os
 import six
@@ -270,7 +262,3 @@ class OCScaleTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_secret.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc secret
 '''
-# To run:
-# ./oc_secret.py
-#
-# .
-# Ran 1 test in 0.002s
-#
-# OK
 
 import os
 import six
@@ -204,7 +196,3 @@ class OCSecretTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_service.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc service
 '''
-# To run
-# python -m unittest version
-#
-# .
-# Ran 1 test in 0.597s
-#
-# OK
 
 import os
 import six
@@ -319,7 +311,3 @@ class OCServiceTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_serviceaccount.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc serviceaccount
 '''
-# To run:
-# ./oc_serviceaccount.py
-#
-# .
-# Ran 1 test in 0.002s
-#
-# OK
 
 import os
 import six
@@ -227,7 +219,3 @@ class OCServiceAccountTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_serviceaccount_secret.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc secret add
 '''
-# To run:
-# ./oc_serviceaccount_secret.py
-#
-# .
-# Ran 1 test in 0.002s
-#
-# OK
 
 import os
 import six
@@ -428,7 +420,3 @@ secrets:
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_openshift/src/test/unit/test_oc_version.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for oc version
 '''
-# To run
-# python -m unittest version
-#
-# .
-# Ran 1 test in 0.597s
-#
-# OK
 
 import os
 import six
@@ -176,7 +168,3 @@ class OCVersionTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_utils/src/test/unit/test_repoquery.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for repoquery
 '''
-# To run:
-# ./repoquery.py
-#
-# .
-# Ran 1 test in 0.002s
-#
-# OK
 
 import os
 import sys
@@ -81,7 +73,3 @@ class RepoQueryTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         pass
-
-
-if __name__ == "__main__":
-    unittest.main()

+ 0 - 12
roles/lib_utils/src/test/unit/test_yedit.py

@@ -1,14 +1,6 @@
-#!/usr/bin/env python2
 '''
  Unit tests for yedit
 '''
-# To run
-# python -m unittest yedit_test
-#
-# .............................
-# ----------------------------------------------------------------------
-# Ran 29 tests in 0.133s
-# OK
 
 import os
 import sys
@@ -288,7 +280,3 @@ class YeditTest(unittest.TestCase):
     def tearDown(self):
         '''TearDown method'''
         os.unlink(YeditTest.filename)
-
-
-if __name__ == "__main__":
-    unittest.main()