Skip to content

Commit eba1b43

Browse files
committed
Fix test_autoscale_rejects_join_with_wrong_cluster_pub_signature
Use the same fix as the previous test - check for bootstrap master's peer key instead of cluster.pem to verify join was rejected.
1 parent 57969b7 commit eba1b43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/pytests/integration/cluster/test_autoscale_security.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,12 +627,12 @@ def test_autoscale_rejects_join_with_wrong_cluster_pub_signature(
627627
with factory.started(start_timeout=30):
628628
time.sleep(10)
629629

630-
# Check that cluster keys were NOT created (join failed)
630+
# Check that the bootstrap master's peer key was NOT written (join was rejected)
631631
cluster_pki_dir = pathlib.Path(factory.config["cluster_pki_dir"])
632-
cluster_key = cluster_pki_dir / "cluster.pem"
632+
bootstrap_peer_key = cluster_pki_dir / "peers" / f"{autoscale_bootstrap_master.config['id']}.pub"
633633

634-
assert not cluster_key.exists(), (
635-
"Cluster key should NOT be created when signature doesn't match"
634+
assert not bootstrap_peer_key.exists(), (
635+
f"Bootstrap master peer key should NOT be created when signature doesn't match: {bootstrap_peer_key}"
636636
)
637637

638638

0 commit comments

Comments
 (0)