From 3e26186f8528f368e02692bba201048180debd81 Mon Sep 17 00:00:00 2001 From: Dmitrii Iurco Date: Sat, 6 Jun 2026 06:20:52 -0400 Subject: [PATCH] fix: correct fake WireGuard key length and guard cell2_client teardown The synthetic cell fixture used a 46-char base64 key where the validator expects exactly 43 chars before '='. The key failed format validation so add_cell_peer returned False, making the cell connection store nothing and all TestCellPermissionsApi tests hit 404. The TestCellServiceAccessRestrictions and TestLiveCellConnection teardown fixtures called _remove_connection(cell2_client, ...) without checking if cell2_client is None (expected when no second cell is configured), causing AttributeError on teardown. Co-Authored-By: Claude Sonnet 4.6 --- tests/e2e/api/test_cell_to_cell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/api/test_cell_to_cell.py b/tests/e2e/api/test_cell_to_cell.py index 8317af0..7695a8d 100644 --- a/tests/e2e/api/test_cell_to_cell.py +++ b/tests/e2e/api/test_cell_to_cell.py @@ -193,7 +193,7 @@ class TestCellPermissionsApi: fake_dns_ip = '10.99.0.1' fake_invite = { 'cell_name': 'e2etest-synthetic-cell', - 'public_key': 'AAAAFakePublicKeyForE2eTestingAAAAAAAAAAAAAAAA=', + 'public_key': 'FakePublicKeyForE2eCellTestAAAAAAAAAAAAAAAA=', 'endpoint': '127.0.0.2:51820', 'vpn_subnet': fake_subnet, 'dns_ip': fake_dns_ip, @@ -334,7 +334,7 @@ class TestLiveCellConnection: if cell2_name: _remove_connection(admin_client, cell2_name) - if cell1_name: + if cell1_name and cell2_client: _remove_connection(cell2_client, cell1_name) def _connect_cells(self, admin_client, cell2_client, @@ -530,7 +530,7 @@ class TestCellServiceAccessRestrictions: cell1_name = None if cell2_name: _remove_connection(admin_client, cell2_name) - if cell1_name: + if cell1_name and cell2_client: _remove_connection(cell2_client, cell1_name) def _get_forward_rules(self, client) -> str: