release: prepare 0.2.0 for sing-box 1.14
This commit is contained in:
@@ -8,6 +8,32 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
class PackagingTests(unittest.TestCase):
|
||||
def test_makefile_supports_src_layout(self) -> None:
|
||||
makefile = (ROOT / "Makefile").read_text(encoding="utf-8")
|
||||
self.assertIn("PYTHONPATH=src:.", makefile)
|
||||
|
||||
def test_release_metadata_is_mpl_2_and_version_0_2(self) -> None:
|
||||
pyproject = (ROOT / "pyproject.toml").read_text(encoding="utf-8")
|
||||
self.assertIn('version = "0.2.0"', pyproject)
|
||||
self.assertIn('license = "MPL-2.0"', pyproject)
|
||||
license_text = (ROOT / "LICENSE").read_text(encoding="utf-8")
|
||||
self.assertIn("Mozilla Public License Version 2.0", license_text)
|
||||
debian_copyright = (ROOT / "debian/copyright").read_text(encoding="utf-8")
|
||||
self.assertIn("License: MPL-2.0", debian_copyright)
|
||||
|
||||
def test_debian_dependency_is_exactly_1_14_0(self) -> None:
|
||||
control = (ROOT / "debian/control").read_text(encoding="utf-8")
|
||||
self.assertIn("sing-box (= 1.14.0)", control)
|
||||
|
||||
def test_in_place_upgrade_is_rejected(self) -> None:
|
||||
preinst = (ROOT / "debian/preinst").read_text(encoding="utf-8")
|
||||
self.assertIn('[ "$1" = upgrade ]', preinst)
|
||||
self.assertIn("exit 1", preinst)
|
||||
|
||||
def test_postinst_checks_for_legacy_state(self) -> None:
|
||||
postinst = (ROOT / "debian/postinst").read_text(encoding="utf-8")
|
||||
self.assertIn("vpn_egressctl.installcheck", postinst)
|
||||
|
||||
def test_sing_box_drop_in_requires_guard(self) -> None:
|
||||
drop_in = ROOT / "packaging/systemd/sing-box.service.d/10-vpn-egress-guard.conf"
|
||||
text = drop_in.read_text(encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user