diff --git a/checks/update/switch-to-configuration-initrd-mount-fix.patch b/checks/update/switch-to-configuration-initrd-mount-fix.patch index 26876bc66..3fa8040b4 100644 --- a/checks/update/switch-to-configuration-initrd-mount-fix.patch +++ b/checks/update/switch-to-configuration-initrd-mount-fix.patch @@ -1,17 +1,29 @@ -diff --git a/src/main.rs b/src/main.rs -index 8baf5924a7db..1234567890ab 100644 ---- a/src/main.rs -+++ b/src/main.rs -@@ -1295,6 +1295,12 @@ won't take effect until you reboot the system. +From 46ec73cdeac58807a49b738c44d2e8d5dfbc5fc8 Mon Sep 17 00:00:00 2001 +From: pinpox +Date: Mon, 20 Oct 2025 16:30:22 +0200 +Subject: [PATCH] patch switch-to-configuration-ng for container tests + +--- + pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs b/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs +index f4d339ccf60e..c50863e15e32 100644 +--- a/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs ++++ b/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs +@@ -1320,6 +1320,12 @@ won't take effect until you reboot the system. for (mountpoint, current_filesystem) in current_filesystems { // Use current version of systemctl binary before daemon is reexeced. -+ ++ + // Skip filesystem comparison if x-initrd.mount is present in options + if current_filesystem.options.contains("x-initrd.mount") { + continue; + } -+ ++ let unit = path_to_unit_name(¤t_system_bin, &mountpoint); if let Some(new_filesystem) = new_filesystems.get(&mountpoint) { - if current_filesystem.fs_type != new_filesystem.fs_type \ No newline at end of file + if current_filesystem.fs_type != new_filesystem.fs_type +-- +2.51.0 + diff --git a/lib/test/container-test-driver/test_driver/__init__.py b/lib/test/container-test-driver/test_driver/__init__.py index 26f61326c..2a4a25092 100644 --- a/lib/test/container-test-driver/test_driver/__init__.py +++ b/lib/test/container-test-driver/test_driver/__init__.py @@ -501,7 +501,7 @@ def setup_filesystems(container: ContainerInfo) -> None: if file.is_symlink(): target = file.readlink() sym = container.nix_store_dir / file.name - os.symlink(target, sym) + sym.symlink_to(target) # Read /proc/mounts and replicate every bind mount with Path("/proc/self/mounts").open() as f: diff --git a/pkgs/clan-app/clan_app/backends/http/test_http_api.py b/pkgs/clan-app/clan_app/backends/http/test_http_api.py index 7e2a8fd11..7820f36c6 100644 --- a/pkgs/clan-app/clan_app/backends/http/test_http_api.py +++ b/pkgs/clan-app/clan_app/backends/http/test_http_api.py @@ -94,7 +94,7 @@ class TestHttpBridge: def test_http_bridge_middleware_setup(self, http_bridge: tuple) -> None: """Test that middleware is properly set up.""" - api, middleware_chain = http_bridge + _api, middleware_chain = http_bridge # Test that we can create the bridge with middleware # The actual HTTP handling will be tested through the server integration tests diff --git a/pkgs/clan-cli/clan_cli/tests/test_machines_cli.py b/pkgs/clan-cli/clan_cli/tests/test_machines_cli.py index 145234ec4..2760422a3 100644 --- a/pkgs/clan-cli/clan_cli/tests/test_machines_cli.py +++ b/pkgs/clan-cli/clan_cli/tests/test_machines_cli.py @@ -144,7 +144,7 @@ def test_machine_delete( ) -> None: flake = flake_with_sops - admin_key, machine_key, machine2_key, *xs = sops_setup.keys + admin_key, machine_key, machine2_key, *_xs = sops_setup.keys # create a couple machines with their keys for name, key in (("my-machine", machine_key), ("my-machine2", machine2_key)): diff --git a/pkgs/clan-cli/clan_cli/tests/test_vars.py b/pkgs/clan-cli/clan_cli/tests/test_vars.py index cc26b6253..8a2f2aa02 100644 --- a/pkgs/clan-cli/clan_cli/tests/test_vars.py +++ b/pkgs/clan-cli/clan_cli/tests/test_vars.py @@ -1418,7 +1418,7 @@ def test_shared_generator_conflicting_definition_raises_error( # because they have conflicting definitions for the same shared generator with pytest.raises( ClanError, - match=".*differ.*", + match=r".*differ.*", ): cli.run(["vars", "generate", "--flake", str(flake.path)]) diff --git a/pkgs/clan-cli/clan_lib/llm/test_process_chat_turn.py b/pkgs/clan-cli/clan_lib/llm/test_process_chat_turn.py index 0c11df2c3..0b6abeb66 100644 --- a/pkgs/clan-cli/clan_lib/llm/test_process_chat_turn.py +++ b/pkgs/clan-cli/clan_lib/llm/test_process_chat_turn.py @@ -790,7 +790,7 @@ class TestGetLlmFinalDecision: ): mock_agg.return_value = MagicMock(tools=[mock_schema]) - function_call_results, message = get_llm_final_decision( + function_call_results, _message = get_llm_final_decision( user_request="okay then gchq-local as controller and qube-email as moon please everything else as peer", flake=mock_flake, selected_service="zerotier", diff --git a/pkgs/clan-cli/clan_lib/log_manager/test_log_manager.py b/pkgs/clan-cli/clan_lib/log_manager/test_log_manager.py index a50c1b254..cd23826d8 100644 --- a/pkgs/clan-cli/clan_lib/log_manager/test_log_manager.py +++ b/pkgs/clan-cli/clan_lib/log_manager/test_log_manager.py @@ -216,7 +216,7 @@ class TestLogFileCreation: configured_log_manager: LogManager, ) -> None: """Test that creating log file with unregistered group fails.""" - with pytest.raises(ValueError, match="Group structure.*is not valid"): + with pytest.raises(ValueError, match=r"Group structure.*is not valid"): configured_log_manager.create_log_file( example_function, "test_op", @@ -228,7 +228,7 @@ class TestLogFileCreation: configured_log_manager: LogManager, ) -> None: """Test that invalid nested structure fails.""" - with pytest.raises(ValueError, match="Group structure.*is not valid"): + with pytest.raises(ValueError, match=r"Group structure.*is not valid"): configured_log_manager.create_log_file( example_function, "test_op",