team-ljyzipelo

공개

제거 호출 조건 시험과 검증 범위를 보완함

작성자
코노모리 카논
작성 시각
커밋
e3ad72ac45e3f2b75ddf26312debbe6cc71d6521
부모
935881d
이 시점의 파일 보기

변경된 파일 3개

+32-1
수정packaging/ubuntu/rust/README.md+2-0
@@ -27,3 +27,5 @@ sudo로 처음 설치하면 postinst가 SUDO_USER의 ZIP, 7z, TAR.GZ, GZ, TAR
2727로컬 crate에 원문이 없으면 packaging/license-supplements.json의 해당 버전 공식 upstream 원문을 사용합니다. 보충 파일에는 고정 출처 URL, crate 버전과 VCS 커밋, Cargo SPDX 식, UTF-8 원문과 SHA-256이 들어 있습니다. 생성기는 SPDX와 게시된 crate 커밋 및 원문 해시를 오프라인으로 검증합니다. 승인된 표준 보충도 없는 항목은 링크 설명만으로 대체하지 않고 계속 빌드를 차단합니다.
2828
2929upstream에도 원문이 없는 승인된 12개 항목은 SPDX의 MIT 표준 원문과 해당 버전 Cargo.toml의 저자 고지로 보충합니다. 고지에 표준 원문 보충 사유, 선택한 라이선스, 원문과 저자 고지의 출처 및 SHA-256을 표시합니다. Cargo 메타데이터의 전체 라이선스 식은 그대로 보존합니다.
30추가:
31추가: 제거 회귀 시험은 python3 -m unittest discover -s tests/ci -p test_default_apps.py와 python3 -m unittest discover -s tests/release-packages -p test_ubuntu_lifecycle.py로 실행합니다. 실제 패키지 검증은 python3 tests/release-packages/uninstall_defaults_smoke.py <deb 경로>입니다. 기존 Zipelo 설치가 있으면 중단하며, 호스트 기본 앱은 바꾸지 않고 별도 설정 공간에서 이전 앱 복원과 xdg-open을 통한 unzip 실행을 확인합니다. 그래픽 데스크톱 창 조작이나 실제 SUDO_USER 홈의 복원까지 검증하는 명령은 아닙니다.
수정packaging/windows/rust/installer.nsi+0-1
@@ -384,7 +384,6 @@ settings_failed:
384384 MessageBox MB_OK "Windows 설정을 열지 못했습니다. 설정에서 앱 > 기본 앱을 직접 열어주세요."
385385FunctionEnd
386386
387삭제:
388387; 현재 값이 설치 시 기록한 값과 같은 경우에만 지움.
389388!macro RemoveOwnedValue KEY NAME EXPECTED
390389 ReadRegStr $0 HKCU "${KEY}" "${NAME}"
수정tests/release-packages/test_ubuntu_lifecycle.py+30-0
@@ -57,6 +57,36 @@ class LifecycleTests(unittest.TestCase):
5757 env=env, check=True)
5858 self.assertEqual(len(log.read_text().splitlines()), count)
5959
60추가: def test_prerm_restores_only_on_remove_for_known_user(self):
61추가: commands = self.directory / "bin"
62추가: commands.mkdir()
63추가: log = self.directory / "calls"
64추가: for name, content in {
65추가: "getent": '#!/bin/sh\nprintf "tester:x:1000:1000::%s:/bin/sh\\n" "$TEST_HOME"\n',
66추가: "runuser": '#!/bin/sh\nprintf "%s\\n" "$*" >> "$TEST_LOG"\n',
67추가: }.items():
68추가: executable = commands / name
69추가: executable.write_text(content)
70추가: executable.chmod(0o755)
71추가: env = {**os.environ, "PATH": str(commands) + os.pathsep + os.environ["PATH"],
72추가: "SUDO_USER": "tester", "TEST_HOME": str(self.directory), "TEST_LOG": str(log)}
73추가: for action, count in (("upgrade", 0), ("failed-upgrade", 0), ("remove", 1)):
74추가: with self.subTest(action=action):
75추가: log.write_text("")
76추가: subprocess.run(["sh", str(ROOT / "packaging/ubuntu/rust/prerm"), action],
77추가: env=env, check=True, capture_output=True)
78추가: calls = log.read_text().splitlines()
79추가: self.assertEqual(len(calls), count)
80추가: if count:
81추가: self.assertIn("HOME=" + str(self.directory), calls[0])
82추가: self.assertTrue(calls[0].endswith("/usr/lib/zipelo/default-apps remove"))
83추가: env.pop("SUDO_USER")
84추가: log.write_text("")
85추가: result = subprocess.run(["sh", str(ROOT / "packaging/ubuntu/rust/prerm"), "remove"],
86추가: env=env, check=True, capture_output=True, text=True)
87추가: self.assertEqual(log.read_text(), "")
88추가: self.assertIn("사용자를 확인할 수 없어", result.stdout)
89추가:
6090 def check_smoke(self, install_fails=False, purge_fails=False, body_fails=False):
6191 calls = []
6292