3 # TODO: Add more tests here using all the tests/resources/* and automate those tests in a verify job
8 from changes import Changes
10 REMOTE_URL = "ssh://git.opendaylight.org:29418"
25 DISTRO_PATH = "/tmp/distribution-karaf"
31 class TestChanges(unittest.TestCase):
33 print("Starting test: %s" % self.id())
37 branch, distro_patch, limit, qlimit, project_names, remote_url, loglevel=0
40 branch, distro_patch, limit, qlimit, project_names, remote_url, loglevel
42 projects = changes.run_cmd()
43 changes.pretty_print_projects(projects)
45 def test_run_cmd_multiple(self):
46 project_names = PROJECT_NAMES
49 branch, DISTRO_PATH, LIMIT, QLIMIT, project_names, REMOTE_URL, logging.INFO
52 def test_pretty_print(self):
53 project_names = PROJECT_NAMES
54 changes = Changes(BRANCH, DISTRO_PATH, LIMIT, QLIMIT, project_names, REMOTE_URL)
56 for project in project_names:
57 projects[project] = {"commit": 1, "includes": [{"a": 1}]}
58 changes.pretty_print_projects(projects)
59 for project in project_names:
67 "subject": "This is a test for " + project,
73 "subject": "This is a test for " + project,
77 changes.pretty_print_projects(projects)
79 def test_epoch_to_utc(self):
80 project_names = PROJECT_NAMES
81 changes = Changes(BRANCH, DISTRO_PATH, LIMIT, QLIMIT, project_names, REMOTE_URL)
82 print("utc: %s" % changes.epoch_to_utc(1483974872))
84 def test_distcompare(self):
88 if __name__ == "__main__":