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"
24 DISTRO_PATH = "/tmp/distribution-karaf"
30 class TestChanges(unittest.TestCase):
32 print("Starting test: %s" % self.id())
36 branch, distro_patch, limit, qlimit, project_names, remote_url, loglevel=0
39 branch, distro_patch, limit, qlimit, project_names, remote_url, loglevel
41 projects = changes.run_cmd()
42 changes.pretty_print_projects(projects)
44 def test_run_cmd_multiple(self):
45 project_names = PROJECT_NAMES
48 branch, DISTRO_PATH, LIMIT, QLIMIT, project_names, REMOTE_URL, logging.INFO
51 def test_pretty_print(self):
52 project_names = PROJECT_NAMES
53 changes = Changes(BRANCH, DISTRO_PATH, LIMIT, QLIMIT, project_names, REMOTE_URL)
55 for project in project_names:
56 projects[project] = {"commit": 1, "includes": [{"a": 1}]}
57 changes.pretty_print_projects(projects)
58 for project in project_names:
66 "subject": "This is a test for " + project,
72 "subject": "This is a test for " + project,
76 changes.pretty_print_projects(projects)
78 def test_epoch_to_utc(self):
79 project_names = PROJECT_NAMES
80 changes = Changes(BRANCH, DISTRO_PATH, LIMIT, QLIMIT, project_names, REMOTE_URL)
81 print("utc: %s" % changes.epoch_to_utc(1483974872))
83 def test_distcompare(self):
87 if __name__ == "__main__":