mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Proxy tests only exists under pytests/
. Delete unused proxy conf/code.
This commit is contained in:
parent
cc07d99222
commit
679bbe9a86
5 changed files with 2 additions and 102 deletions
|
@ -172,7 +172,7 @@ def pytest_addoption(parser):
|
|||
dest="proxy",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Run proxy tests",
|
||||
help="Run proxy tests (DEPRECATED)",
|
||||
)
|
||||
test_selection_group.addoption(
|
||||
"--run-slow", action="store_true", default=False, help="Run slow tests.",
|
||||
|
@ -1001,40 +1001,6 @@ def salt_sub_minion_factory(salt_master_factory):
|
|||
return factory
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def salt_proxy_factory(salt_factories, salt_master_factory):
|
||||
proxy_minion_id = "proxytest"
|
||||
root_dir = salt_factories.get_root_dir_for_daemon(proxy_minion_id)
|
||||
conf_dir = root_dir / "conf"
|
||||
conf_dir.mkdir(parents=True, exist_ok=True)
|
||||
RUNTIME_VARS.TMP_PROXY_CONF_DIR = str(conf_dir)
|
||||
|
||||
with salt.utils.files.fopen(os.path.join(RUNTIME_VARS.CONF_DIR, "proxy")) as rfh:
|
||||
config_defaults = yaml.deserialize(rfh.read())
|
||||
|
||||
config_defaults["root_dir"] = str(root_dir)
|
||||
config_defaults["hosts.file"] = os.path.join(RUNTIME_VARS.TMP, "hosts")
|
||||
config_defaults["aliases.file"] = os.path.join(RUNTIME_VARS.TMP, "aliases")
|
||||
config_defaults["transport"] = salt_master_factory.config["transport"]
|
||||
|
||||
config_overrides = {
|
||||
"log_level_logfile": "quiet",
|
||||
"file_roots": salt_master_factory.config["file_roots"].copy(),
|
||||
"pillar_roots": salt_master_factory.config["pillar_roots"].copy(),
|
||||
}
|
||||
|
||||
factory = salt_master_factory.salt_proxy_minion_daemon(
|
||||
proxy_minion_id,
|
||||
defaults=config_defaults,
|
||||
overrides=config_overrides,
|
||||
extra_cli_arguments_after_first_start_failure=["--log-level=debug"],
|
||||
)
|
||||
factory.after_terminate(
|
||||
pytest.helpers.remove_stale_minion_key, salt_master_factory, factory.id
|
||||
)
|
||||
return factory
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def salt_cli(salt_master_factory):
|
||||
return salt_master_factory.salt_cli()
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
# basic config
|
||||
# Connects to master
|
||||
master: localhost
|
||||
master_port: 64506
|
||||
interface: 127.0.0.1
|
||||
tcp_pub_port: 64510
|
||||
tcp_pull_port: 64511
|
||||
sock_dir: proxy_sock
|
||||
id: proxytest
|
||||
open_mode: True
|
||||
log_file: proxy.log
|
||||
log_level_logfile: debug
|
||||
pidfile: proxy.pid
|
||||
|
||||
# module extension
|
||||
test.foo: baz
|
||||
integration.test: True
|
||||
|
||||
# Grains addons
|
||||
grains:
|
||||
test_grain: cheese
|
||||
script: grail
|
||||
alot: many
|
||||
planets:
|
||||
- mercury
|
||||
- venus
|
||||
- earth
|
||||
- mars
|
||||
level1:
|
||||
level2: foo
|
||||
companions:
|
||||
one:
|
||||
- susan
|
||||
- ian
|
||||
- barbara
|
||||
|
||||
config_test:
|
||||
spam: eggs
|
||||
|
||||
mine_functions:
|
||||
test.ping: []
|
||||
|
||||
# sdb env module
|
||||
osenv:
|
||||
driver: env
|
||||
|
||||
add_proxymodule_to_opts: False
|
||||
|
||||
proxy:
|
||||
proxytype: dummy
|
|
@ -297,21 +297,8 @@ def salt_sub_minion_factory(salt_master_factory, salt_sub_minion_id):
|
|||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def salt_proxy_factory(salt_factories, salt_master_factory):
|
||||
def salt_proxy_factory(salt_master_factory):
|
||||
proxy_minion_id = random_string("proxytest-")
|
||||
root_dir = salt_factories.get_root_dir_for_daemon(proxy_minion_id)
|
||||
conf_dir = root_dir / "conf"
|
||||
conf_dir.mkdir(parents=True, exist_ok=True)
|
||||
RUNTIME_VARS.TMP_PROXY_CONF_DIR = str(conf_dir)
|
||||
|
||||
with salt.utils.files.fopen(os.path.join(RUNTIME_VARS.CONF_DIR, "proxy")) as rfh:
|
||||
config_defaults = yaml.deserialize(rfh.read())
|
||||
|
||||
config_defaults["root_dir"] = str(root_dir)
|
||||
config_defaults["hosts.file"] = os.path.join(RUNTIME_VARS.TMP, "hosts")
|
||||
config_defaults["aliases.file"] = os.path.join(RUNTIME_VARS.TMP, "aliases")
|
||||
config_defaults["transport"] = salt_master_factory.config["transport"]
|
||||
config_defaults["user"] = salt_master_factory.config["user"]
|
||||
|
||||
config_overrides = {
|
||||
"file_roots": salt_master_factory.config["file_roots"].copy(),
|
||||
|
@ -320,7 +307,6 @@ def salt_proxy_factory(salt_factories, salt_master_factory):
|
|||
|
||||
factory = salt_master_factory.salt_proxy_minion_daemon(
|
||||
proxy_minion_id,
|
||||
defaults=config_defaults,
|
||||
overrides=config_overrides,
|
||||
extra_cli_arguments_after_first_start_failure=["--log-level=debug"],
|
||||
start_timeout=240,
|
||||
|
|
|
@ -72,7 +72,6 @@ TMP_CONF_DIR = TMP_MINION_CONF_DIR = os.path.join(TMP, "config")
|
|||
TMP_SUB_MINION_CONF_DIR = os.path.join(TMP_CONF_DIR, "sub-minion")
|
||||
TMP_SYNDIC_MINION_CONF_DIR = os.path.join(TMP_CONF_DIR, "syndic-minion")
|
||||
TMP_SYNDIC_MASTER_CONF_DIR = os.path.join(TMP_CONF_DIR, "syndic-master")
|
||||
TMP_PROXY_CONF_DIR = TMP_CONF_DIR
|
||||
TMP_SSH_CONF_DIR = TMP_MINION_CONF_DIR
|
||||
CONF_DIR = os.path.join(INTEGRATION_TEST_DIR, "files", "conf")
|
||||
PILLAR_DIR = os.path.join(FILES, "pillar")
|
||||
|
|
|
@ -184,7 +184,6 @@ RUNTIME_VARS = RuntimeVars(
|
|||
TMP_SUB_MINION_CONF_DIR=paths.TMP_SUB_MINION_CONF_DIR,
|
||||
TMP_SYNDIC_MASTER_CONF_DIR=paths.TMP_SYNDIC_MASTER_CONF_DIR,
|
||||
TMP_SYNDIC_MINION_CONF_DIR=paths.TMP_SYNDIC_MINION_CONF_DIR,
|
||||
TMP_PROXY_CONF_DIR=paths.TMP_PROXY_CONF_DIR,
|
||||
TMP_SSH_CONF_DIR=paths.TMP_SSH_CONF_DIR,
|
||||
TMP_SCRIPT_DIR=paths.TMP_SCRIPT_DIR,
|
||||
TMP_STATE_TREE=paths.TMP_STATE_TREE,
|
||||
|
|
Loading…
Add table
Reference in a new issue