def git_tag_test(self): """Test creating an rpm from a git tag""" git_repo = toml.loads(""" [[repos.git]] rpmname="git-rpm-test" rpmversion="1.0.0" rpmrelease="1" summary="Testing the git rpm code" repo="file://%s" ref="v1.1.0" destination="/srv/testing-rpm/" """ % (self.repodir)) try: rpm_dir = tempfile.mkdtemp(prefix="git-rpm-test.") rpm_file = make_git_rpm(git_repo["repos"]["git"][0], rpm_dir) self._check_rpm(git_repo["repos"]["git"][0], rpm_dir, rpm_file, "second") finally: shutil.rmtree(rpm_dir)
def test_git_branch(self): """Test creating an rpm from a git branch""" git_repo = toml.loads(""" [[repos.git]] rpmname="git-rpm-test" rpmversion="1.0.0" rpmrelease="1" summary="Testing the git rpm code" repo="file://%s" ref="origin/custom-branch" destination="/srv/testing-rpm/" """ % self.repodir) try: rpm_dir = tempfile.mkdtemp(prefix="git-rpm-test.") rpm_file = make_git_rpm(git_repo["repos"]["git"][0], rpm_dir) self._check_rpm(git_repo["repos"]["git"][0], rpm_dir, rpm_file, "branch") finally: shutil.rmtree(rpm_dir)