ALPHA: wire is a tool to deploy nixos systems
wire.althaea.zone/
1# SPDX-License-Identifier: AGPL-3.0-or-later
2# Copyright 2024-2025 wire Contributors
3
4from typing import TYPE_CHECKING
5
6if TYPE_CHECKING:
7 from test_driver.machine import Machine
8
9# typing-end
10
11
12def collect_store_objects(machine: Machine) -> set[str]:
13 return set(machine.succeed("ls /nix/store").strip().split("\n"))
14
15
16def assert_store_not_poisoned(machine: Machine, poison: str, objects: set[str]):
17 paths = list(map(lambda n: f"/nix/store/{n}", objects))
18
19 machine.succeed("which rg")
20 machine.fail(f"rg '{poison}' {' '.join(paths)}")