def test_get_projects(self, tmpdir):
"""Verify that we can retrieve projects."""
p = tmpdir.mkdir('test')
path = str(p)
repo = Repo.init(path)
file = p / 'test1.yml'
file.write_text(u"""---
tempest_git_repo: https://git.openstack.org/openstack/tempest
tempest_git_install_branch: 1493c7f0ba49bfccb9ff8516b10a65d949d7462e
tempest_git_project_group: utility_all
""", encoding='utf-8')
file = p / 'test2.yml'
file.write_text(u"""---
novncproxy_git_repo: https://github.com/kanaka/novnc
novncproxy_git_install_branch: da82b3426c27bf1a79f671c5825d68ab8c0c5d9f
novncproxy_git_project_group: nova_console
""", encoding='utf-8')
repo.index.add(['test1.yml', 'test2.yml'])
repo.index.commit("Test")
projects = osa_differ.get_projects(path,
'HEAD')
assert isinstance(projects, list)
评论列表
文章目录