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)
| 22 | |
| 23 | |
| 24 | def 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 |