summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@sommerfeld.dev>2026-09-30 08:54:59 +0100
committersommerfeld <sommerfeld@sommerfeld.dev>2026-09-30 08:54:59 +0100
commitb459cd706ad72c20cf5540e44e0547a999ddfd99 (patch)
tree0d43cc4f00a4f1dd6549b4a65b33695dcba8918a /tests
parent6b73350f2168ce55a874f618c962fddc0dadfe22 (diff)
downloaddotfiles-b459cd706ad72c20cf5540e44e0547a999ddfd99.tar.gz
dotfiles-b459cd706ad72c20cf5540e44e0547a999ddfd99.tar.bz2
dotfiles-b459cd706ad72c20cf5540e44e0547a999ddfd99.zip
Allow no-argument NvPCR boot check
Diffstat (limited to 'tests')
-rw-r--r--tests/test_nvpcr.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_nvpcr.py b/tests/test_nvpcr.py
index 02bafb1..57b3c81 100644
--- a/tests/test_nvpcr.py
+++ b/tests/test_nvpcr.py
@@ -12,6 +12,16 @@ ROOT = Path(__file__).resolve().parents[1]
class NvPCRConfigTests(unittest.TestCase):
+ def test_check_recipe_accepts_no_images_or_one_image(self):
+ for images in ((), ("candidate.efi",)):
+ output = subprocess.check_output(
+ ["just", "--dry-run", "tpm-nvpcr-check", *images],
+ cwd=ROOT,
+ stderr=subprocess.STDOUT,
+ text=True,
+ )
+ self.assertIn("scripts/tpm_nvpcr.py", output)
+
def test_hook_adds_required_initrd_services(self):
hook = ROOT / "etc/initcpio/install/nvpcr"
output = subprocess.check_output(