distchanges fix for messages with () in them
[integration/test.git] / tools / distchanges / tests / test_changes.py
1 #!/usr/bin/env python
2
3 import unittest
4
5 from changes import Changes
6
7 REMOTE_URL = 'ssh://git.opendaylight.org:29418'
8 NETVIRT_PROJECTS = ["netvirt", "controller", "dlux", "dluxapps", "genius", "infrautils", "mdsal", "netconf",
9                     "neutron", "odlparent", "openflowplugin", "ovsdb", "sfc", "yangtools"]
10 PROJECT_NAMES = NETVIRT_PROJECTS
11 DISTRO_PATH = "/tmp/distribution-karaf"
12 BRANCH = 'master'
13 LIMIT = 10
14 QLIMIT = 50
15
16
17 class TestChanges(unittest.TestCase):
18
19     def setUp(self):
20         print("Starting test: %s" % self.id())
21
22     @staticmethod
23     def run_cmd(branch, distro_patch, limit, qlimit, project_names, remote_url):
24         changes = Changes(branch, distro_patch, limit, qlimit, project_names, remote_url, 3)
25         projects = changes.run_cmd()
26         changes.pretty_print_projects(projects)
27
28     def test_run_cmd_single(self):
29         project_names = ['netconf']
30         self.run_cmd(BRANCH, DISTRO_PATH, LIMIT, QLIMIT, project_names, REMOTE_URL)
31
32     def test_run_cmd_multiple(self):
33         project_names = PROJECT_NAMES
34         self.run_cmd(BRANCH, DISTRO_PATH, LIMIT, QLIMIT, project_names, REMOTE_URL)
35
36
37 if __name__ == '__main__':
38     unittest.main()