aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-03-05 19:51:56 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2023-03-05 19:51:56 +0200
commitea78fb2ea4bf99253d31afea9b6141f8ffc5b6dc (patch)
treee9d7652ffe48bd3ae93d1b2190463ab71161eb93 /tests
parenttox: add {posargs} to pytest invocation (diff)
downloadpkgcheck-ea78fb2ea4bf99253d31afea9b6141f8ffc5b6dc.tar.gz
pkgcheck-ea78fb2ea4bf99253d31afea9b6141f8ffc5b6dc.tar.bz2
pkgcheck-ea78fb2ea4bf99253d31afea9b6141f8ffc5b6dc.zip
GitPkgCommitsCheck: add check for EAPI change without revbump
Resolves: https://github.com/pkgcore/pkgcheck/issues/557 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/checks/test_git.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/checks/test_git.py b/tests/checks/test_git.py
index 5deaad71..7eb7907a 100644
--- a/tests/checks/test_git.py
+++ b/tests/checks/test_git.py
@@ -395,7 +395,7 @@ class TestGitPkgCommitsCheck(ReportTestCase):
self.parent_repo = make_repo(self.parent_git_repo.path, repo_id="gentoo", arches=["amd64"])
self.parent_git_repo.add_all("initial commit")
# create a stub pkg and commit it
- self.parent_repo.create_ebuild("cat/pkg-0")
+ self.parent_repo.create_ebuild("cat/pkg-0", eapi="7")
self.parent_git_repo.add_all("cat/pkg-0")
# initialize child repo
@@ -694,6 +694,16 @@ class TestGitPkgCommitsCheck(ReportTestCase):
expected = git_mod.PythonPEP517WithoutRevbump(pkg=CPV("newcat/newpkg-1"))
assert r == expected
+ def test_eapi_change(self):
+ # bump eapi
+ self.child_repo.create_ebuild("cat/pkg-0", eapi="8")
+ self.child_git_repo.add_all("cat/pkg-0")
+ # pull changes to child repo
+ self.init_check()
+ r = self.assertReport(self.check, self.source)
+ expected = git_mod.EAPIChangeWithoutRevbump(pkg=CPV("cat/pkg-0"))
+ assert r == expected
+
def test_src_uri_change(self):
distfile = [
"DIST",
@@ -721,8 +731,8 @@ class TestGitPkgCommitsCheck(ReportTestCase):
assert r == git_mod.SuspiciousSrcUriChange(old_url, new_url, distfile[1], pkg=CP("cat/pkg"))
# revert change and check for no report with same mirror url
self.child_git_repo.run(["git", "reset", "--hard", "origin/main"])
- self.child_repo.create_ebuild("cat/pkg-1", src_uri=old_url, eapi="8")
- self.child_git_repo.add_all("cat/pkg: bump EAPI", signoff=True)
+ self.child_repo.create_ebuild("cat/pkg-1", src_uri=old_url, homepage="https://gentoo.org")
+ self.child_git_repo.add_all("cat/pkg: update HOMEPAGE", signoff=True)
self.init_check()
self.assertNoReport(self.check, self.source)