Generate tests to write
This commit is contained in:
parent
8f8a685083
commit
ef72b8a39f
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,6 +8,7 @@
|
|||||||
*.sqlite
|
*.sqlite
|
||||||
*~
|
*~
|
||||||
*.sql
|
*.sql
|
||||||
|
.pythoscope
|
||||||
.tox
|
.tox
|
||||||
.venv
|
.venv
|
||||||
.testrepository
|
.testrepository
|
||||||
|
54
tests/lib/test_utils.py
Normal file
54
tests/lib/test_utils.py
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestGitRepository(unittest.TestCase):
|
||||||
|
def test___init__(self):
|
||||||
|
# git_repository = GitRepository(remote_url, local_path)
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_checkout(self):
|
||||||
|
# git_repository = GitRepository(remote_url, local_path)
|
||||||
|
# self.assertEqual(expected, git_repository.checkout(ref))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_fetch(self):
|
||||||
|
# git_repository = GitRepository(remote_url, local_path)
|
||||||
|
# self.assertEqual(expected, git_repository.fetch(ref))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_reset(self):
|
||||||
|
# git_repository = GitRepository(remote_url, local_path)
|
||||||
|
# self.assertEqual(expected, git_repository.reset())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_update(self):
|
||||||
|
# git_repository = GitRepository(remote_url, local_path)
|
||||||
|
# self.assertEqual(expected, git_repository.update())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
class TestExecuteToLog(unittest.TestCase):
|
||||||
|
def test_execute_to_log(self):
|
||||||
|
# self.assertEqual(expected, execute_to_log(cmd, logfile, timeout, watch_logs, heartbeat))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
class TestPushFile(unittest.TestCase):
|
||||||
|
def test_push_file(self):
|
||||||
|
# self.assertEqual(expected, push_file(job_name, file_path, publish_config))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
class TestSwiftPushFile(unittest.TestCase):
|
||||||
|
def test_swift_push_file(self):
|
||||||
|
# self.assertEqual(expected, swift_push_file(job_name, file_path, swift_config))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
class TestLocalPushFile(unittest.TestCase):
|
||||||
|
def test_local_push_file(self):
|
||||||
|
# self.assertEqual(expected, local_push_file(job_name, file_path, local_config))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
class TestScpPushFile(unittest.TestCase):
|
||||||
|
def test_scp_push_file(self):
|
||||||
|
# self.assertEqual(expected, scp_push_file(job_name, file_path, local_config))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
@ -0,0 +1,24 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestGenerateLogIndex(unittest.TestCase):
|
||||||
|
def test_generate_log_index(self):
|
||||||
|
# self.assertEqual(expected, generate_log_index(datasets))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
class TestMakeIndexFile(unittest.TestCase):
|
||||||
|
def test_make_index_file(self):
|
||||||
|
# self.assertEqual(expected, make_index_file(datasets))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
class TestGeneratePushResults(unittest.TestCase):
|
||||||
|
def test_generate_push_results(self):
|
||||||
|
# self.assertEqual(expected, generate_push_results(datasets))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
class TestCheckLogForErrors(unittest.TestCase):
|
||||||
|
def test_check_log_for_errors(self):
|
||||||
|
# self.assertEqual(expected, check_log_for_errors(logfile))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
34
tests/task_plugins/gate_real_db_upgrade/test_upgrade_task.py
Normal file
34
tests/task_plugins/gate_real_db_upgrade/test_upgrade_task.py
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestRunner(unittest.TestCase):
|
||||||
|
def test___init__(self):
|
||||||
|
# runner = Runner(config)
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_run(self):
|
||||||
|
# runner = Runner(config)
|
||||||
|
# self.assertEqual(expected, runner.run())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_setup_gearman(self):
|
||||||
|
# runner = Runner(config)
|
||||||
|
# self.assertEqual(expected, runner.setup_gearman())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_stop(self):
|
||||||
|
# runner = Runner(config)
|
||||||
|
# self.assertEqual(expected, runner.stop())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_stop_worker(self):
|
||||||
|
# runner = Runner(config)
|
||||||
|
# self.assertEqual(expected, runner.stop_worker(number))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_stopped(self):
|
||||||
|
# runner = Runner(config)
|
||||||
|
# self.assertEqual(expected, runner.stopped())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
29
tests/test_worker_manager.py
Normal file
29
tests/test_worker_manager.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestGearmanManager(unittest.TestCase):
|
||||||
|
def test___init__(self):
|
||||||
|
# gearman_manager = GearmanManager(config, tasks)
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_run(self):
|
||||||
|
# gearman_manager = GearmanManager(config, tasks)
|
||||||
|
# self.assertEqual(expected, gearman_manager.run())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_setup_gearman(self):
|
||||||
|
# gearman_manager = GearmanManager(config, tasks)
|
||||||
|
# self.assertEqual(expected, gearman_manager.setup_gearman())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_stop(self):
|
||||||
|
# gearman_manager = GearmanManager(config, tasks)
|
||||||
|
# self.assertEqual(expected, gearman_manager.stop())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_stopped(self):
|
||||||
|
# gearman_manager = GearmanManager(config, tasks)
|
||||||
|
# self.assertEqual(expected, gearman_manager.stopped())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
@ -1,5 +1,39 @@
|
|||||||
import testtools
|
import unittest
|
||||||
|
|
||||||
|
class TestServer(unittest.TestCase):
|
||||||
|
def test___init__(self):
|
||||||
|
# server = Server(config)
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
class WorkerServerTestCase(testtools.TestCase):
|
def test_exit_handler(self):
|
||||||
pass
|
# server = Server(config)
|
||||||
|
# self.assertEqual(expected, server.exit_handler(signum))
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_load_plugins(self):
|
||||||
|
# server = Server(config)
|
||||||
|
# self.assertEqual(expected, server.load_plugins())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_main(self):
|
||||||
|
# server = Server(config)
|
||||||
|
# self.assertEqual(expected, server.main())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_run_tasks(self):
|
||||||
|
# server = Server(config)
|
||||||
|
# self.assertEqual(expected, server.run_tasks())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
def test_setup_logging(self):
|
||||||
|
# server = Server(config)
|
||||||
|
# self.assertEqual(expected, server.setup_logging())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
class TestMain(unittest.TestCase):
|
||||||
|
def test_main(self):
|
||||||
|
# self.assertEqual(expected, main())
|
||||||
|
assert False # TODO: implement your test here
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user