mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix pre commit in tests
This commit is contained in:
parent
c3e99eda87
commit
77d79ddfe8
2 changed files with 24 additions and 11 deletions
|
@ -4,17 +4,14 @@ import subprocess
|
|||
import pytest
|
||||
|
||||
import salt.utils.platform
|
||||
|
||||
|
||||
from tests.pytests.integration.cluster.conftest import (
|
||||
cluster_shared_path,
|
||||
cluster_pki_path,
|
||||
cluster_cache_path,
|
||||
cluster_master_1,
|
||||
cluster_master_2,
|
||||
cluster_master_3,
|
||||
cluster_minion_1,
|
||||
cluster_pki_path,
|
||||
cluster_shared_path,
|
||||
)
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
import os
|
||||
import pathlib
|
||||
import time
|
||||
import os
|
||||
|
||||
import salt.crypt
|
||||
|
||||
|
||||
def test_cluster_key_rotation(
|
||||
cluster_master_1, cluster_master_2, cluster_master_3, cluster_minion_1,
|
||||
cluster_master_1,
|
||||
cluster_master_2,
|
||||
cluster_master_3,
|
||||
cluster_minion_1,
|
||||
cluster_cache_path,
|
||||
):
|
||||
cli = cluster_master_2.salt_cli(timeout=120)
|
||||
|
@ -14,9 +18,15 @@ def test_cluster_key_rotation(
|
|||
|
||||
# Validate the aes session key for all masters match
|
||||
keys = set()
|
||||
for master in (cluster_master_1, cluster_master_2, cluster_master_3,):
|
||||
for master in (
|
||||
cluster_master_1,
|
||||
cluster_master_2,
|
||||
cluster_master_3,
|
||||
):
|
||||
config = cluster_minion_1.config.copy()
|
||||
config["master_uri"] = f"tcp://{master.config['interface']}:{master.config['ret_port']}"
|
||||
config[
|
||||
"master_uri"
|
||||
] = f"tcp://{master.config['interface']}:{master.config['ret_port']}"
|
||||
auth = salt.crypt.SAuth(config)
|
||||
auth.authenticate()
|
||||
assert "aes" in auth._creds
|
||||
|
@ -45,9 +55,15 @@ def test_cluster_key_rotation(
|
|||
keys = set()
|
||||
|
||||
# Validate the aes session key for all masters match
|
||||
for master in (cluster_master_1, cluster_master_2, cluster_master_3,):
|
||||
for master in (
|
||||
cluster_master_1,
|
||||
cluster_master_2,
|
||||
cluster_master_3,
|
||||
):
|
||||
config = cluster_minion_1.config.copy()
|
||||
config["master_uri"] = f"tcp://{master.config['interface']}:{master.config['ret_port']}"
|
||||
config[
|
||||
"master_uri"
|
||||
] = f"tcp://{master.config['interface']}:{master.config['ret_port']}"
|
||||
auth = salt.crypt.SAuth(config)
|
||||
auth.authenticate()
|
||||
assert "aes" in auth._creds
|
||||
|
|
Loading…
Add table
Reference in a new issue