ALPHA: wire is a tool to deploy nixos systems wire.althaea.zone/
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

add test for rolling back

+36
+1
tests/nix/default.nix
··· 30 30 ./suite/test_local_deploy 31 31 ./suite/test_keys 32 32 ./suite/test_stdin 33 + ./suite/test_rollback 33 34 ]; 34 35 options.wire.testing = mkOption { 35 36 type = attrsOf (
+20
tests/nix/suite/test_rollback/default.nix
··· 1 + # SPDX-License-Identifier: AGPL-3.0-or-later 2 + # Copyright 2024-2025 wire Contributors 3 + 4 + { 5 + wire.testing.test_remote_deploy = { 6 + nodes.deployer = { 7 + _wire.deployer = true; 8 + }; 9 + nodes.receiver = { 10 + _wire.receiver = true; 11 + }; 12 + testScript = '' 13 + with subtest("Deploy broken config"): 14 + deployer.fail(f"wire apply --on receiver --no-progress --path {TEST_DIR}/hive.nix --no-keys -vvv >&2") 15 + 16 + with subtest("Configuration must revert"): 17 + receiver.wait_for_unit("sshd.service") 18 + ''; 19 + }; 20 + }
+15
tests/nix/suite/test_rollback/hive.nix
··· 1 + # SPDX-License-Identifier: AGPL-3.0-or-later 2 + # Copyright 2024-2025 wire Contributors 3 + 4 + let 5 + inherit (import ../utils.nix { testName = "test_rollback-@IDENT@"; }) makeHive mkHiveNode; 6 + in 7 + makeHive { 8 + meta.nixpkgs = import <nixpkgs> { localSystem = "x86_64-linux"; }; 9 + 10 + receiver = mkHiveNode { hostname = "receiver"; } { 11 + environment.etc."identity".text = "first"; 12 + 13 + services.openssh.enable = false; 14 + }; 15 + }