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)
| 8 | |
| 9 | |
| 10 | def 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 | |
| 24 | def test_fsclient_masterless_fs_update(minion_opts): |