We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f780a7b commit 31254b0Copy full SHA for 31254b0
1 file changed
tests/pytests/unit/client/ssh/test_extmods.py
@@ -0,0 +1,17 @@
1
+import re
2
+
3
+import salt.client.ssh
4
+import salt.fileclient
5
+from tests.support.mock import MagicMock, patch
6
7
8
+def test_internal_modules_are_not_synced_as_extmods(master_opts):
9
+ fsclient = salt.fileclient.FSClient(master_opts)
10
+ tar = MagicMock()
11
+ with patch("tarfile.open", return_value=tar):
12
+ salt.client.ssh.mod_data(fsclient)
13
+ ptrn = re.compile(
14
+ r".*/salt/(modules|states|grains|renderers|returners|utils)/\w+\.py$"
15
+ )
16
+ for call in tar.add.call_args_list:
17
+ assert not ptrn.match(call[0][0])
0 commit comments