MCPcopy
hub / github.com/saltstack/salt / test_fsclient_master_no_fs_update

Function test_fsclient_master_no_fs_update

tests/pytests/unit/test_fileclient.py:10–21  ·  view source on GitHub ↗

Test that an FSClient spawned from the master does not cause fileserver backends to be refreshed on instantiation. The master already has the maintenance thread for that.

(master_opts)

Source from the content-addressed store, hash-verified

8
9
10def test_fsclient_master_no_fs_update(master_opts):
11 """
12 Test that an FSClient spawned from the master does not cause fileserver
13 backends to be refreshed on instantiation. The master already has the
14 maintenance thread for that.
15 """
16 overrides = {"file_client": "local"}
17 opts = salt.config.apply_master_config(overrides, master_opts)
18 fileserver = MagicMock()
19 with patch("salt.fileserver.Fileserver", fileserver):
20 client = fileclient.FSClient(opts)
21 assert client.channel.fs.update.call_count == 0
22
23
24def test_fsclient_masterless_fs_update(minion_opts):

Callers

nothing calls this directly

Calls 1

patchFunction · 0.50

Tested by

no test coverage detected