File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 3
3
from time import time
4
4
5
5
import pytest
6
-
6
+ import salt . config
7
7
import salt .fileserver .gitfs
8
8
import salt .utils .gitfs
9
9
from salt .exceptions import FileserverConfigError
24
24
import pygit2
25
25
26
26
27
+ @pytest .fixture
28
+ def minion_opts (tmp_path ):
29
+ """
30
+ Default minion configuration with relative temporary paths to not require root permissions.
31
+ """
32
+ root_dir = tmp_path / "minion"
33
+ opts = salt .config .DEFAULT_MINION_OPTS .copy ()
34
+ opts ["__role" ] = "minion"
35
+ opts ["root_dir" ] = str (root_dir )
36
+ for name in ("cachedir" , "pki_dir" , "sock_dir" , "conf_dir" ):
37
+ dirpath = root_dir / name
38
+ dirpath .mkdir (parents = True )
39
+ opts [name ] = str (dirpath )
40
+ opts ["log_file" ] = "logs/minion.log"
41
+ return opts
42
+
43
+
27
44
@pytest .mark .parametrize (
28
45
"role_name,role_class" ,
29
46
(
You can’t perform that action at this time.
0 commit comments