mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
debugging test
This commit is contained in:
parent
61392d0459
commit
41fb26f49d
1 changed files with 19 additions and 6 deletions
|
@ -560,7 +560,8 @@ def test_caller(schema, react_wrap):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("file_client", ["runner", "wheel", "local", "caller"])
|
## DGM @pytest.mark.parametrize("file_client", ["runner", "wheel", "local", "caller"])
|
||||||
|
@pytest.mark.parametrize("file_client", ["runner"])
|
||||||
def test_client_cache_missing_key(file_client, react_wrap):
|
def test_client_cache_missing_key(file_client, react_wrap):
|
||||||
"""
|
"""
|
||||||
Test client_cache file_client missing, gets repopulated
|
Test client_cache file_client missing, gets repopulated
|
||||||
|
@ -575,14 +576,26 @@ def test_client_cache_missing_key(file_client, react_wrap):
|
||||||
thread_pool = Mock()
|
thread_pool = Mock()
|
||||||
thread_pool.fire_async = Mock()
|
thread_pool.fire_async = Mock()
|
||||||
with patch.object(react_wrap, "client_cache", client_cache):
|
with patch.object(react_wrap, "client_cache", client_cache):
|
||||||
|
print(
|
||||||
|
f"DGM test_client_cache_missing_key patch client_cache, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
|
||||||
|
flush=True,
|
||||||
|
)
|
||||||
with patch.object(react_wrap, "pool", thread_pool):
|
with patch.object(react_wrap, "pool", thread_pool):
|
||||||
react_wrap.run(chunk)
|
react_wrap.run(chunk)
|
||||||
|
print(
|
||||||
|
f"DGM test_client_cache_missing_key patch pool, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
|
||||||
|
flush=True,
|
||||||
|
)
|
||||||
|
del react_wrap.client_cache[f"{file_client}"]
|
||||||
|
print(
|
||||||
|
f"DGM test_client_cache_missing_key post del key, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
|
||||||
|
flush=True,
|
||||||
|
)
|
||||||
|
|
||||||
thread_pool.fire_async.assert_called_with(
|
thread_pool.fire_async.assert_called_with(
|
||||||
react_wrap.client_cache[file_client].low,
|
react_wrap.client_cache[file_client].low,
|
||||||
args=WRAPPER_CALLS[tag],
|
args=WRAPPER_CALLS[tag],
|
||||||
)
|
)
|
||||||
|
client_cache[file_client].cmd.assert_called_with(
|
||||||
|
*WRAPPER_CALLS[tag]["args"], **WRAPPER_CALLS[tag]["kwargs"]
|
||||||
## DGM client_cache[file_client].cmd.assert_called_with(
|
)
|
||||||
## DGM *WRAPPER_CALLS[tag]["args"], **WRAPPER_CALLS[tag]["kwargs"]
|
|
||||||
## DGM )
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue