Skip to content

Commit 31254b0

Browse files
committed
Add test for issue #69199
1 parent f780a7b commit 31254b0

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)