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

Function test_fsclient_masterless_fs_update

tests/pytests/unit/test_fileclient.py:24–35  ·  view source on GitHub ↗

Test that an FSClient spawned from a masterless run refreshes the fileserver backends. This is necessary to ensure that a masterless run can access any configured gitfs remotes.

(minion_opts)

Source from the content-addressed store, hash-verified

22
23
24def test_fsclient_masterless_fs_update(minion_opts):
25 """
26 Test that an FSClient spawned from a masterless run refreshes the
27 fileserver backends. This is necessary to ensure that a masterless run
28 can access any configured gitfs remotes.
29 """
30 overrides = {"file_client": "local"}
31 opts = salt.config.apply_minion_config(overrides, minion_opts)
32 fileserver = MagicMock()
33 with patch("salt.fileserver.Fileserver", fileserver):
34 client = fileclient.FSClient(opts)
35 assert client.channel.fs.update.call_count == 1

Callers

nothing calls this directly

Calls 1

patchFunction · 0.50

Tested by

no test coverage detected