summaryrefslogtreecommitdiff
path: root/reconfigure/tests/configs/samba_tests.py
blob: 26046392e2c45511b1448b3d340abb0bf13a960b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
from reconfigure.configs import SambaConfig
from reconfigure.tests.configs.base_test import BaseConfigTest


class SambaConfigTest (BaseConfigTest):
    sources = {
        None: """
[global]
workgroup=WORKGROUP
server string=%h server (Samba, Ubuntu)
interfaces=127.0.0.0/8 eth0
bind interfaces only=yes
log file=/var/log/samba/log.%m
security=user

[homes]
comment=Home Directories
browseable=no

[profiles]
comment=Users profiles
path=/home/samba/profiles
guest ok=no
browseable=no
create mask=0600
directory mask=0700
"""
    }

    result = {
        "global": {
            "server_string": "%h server (Samba, Ubuntu)",
            "workgroup": "WORKGROUP",
            "interfaces": "127.0.0.0/8 eth0",
            "bind_interfaces_only": True,
            "security": "user",
            "log_file": "/var/log/samba/log.%m"
        },
        "shares": [
            {
                "name": "homes",
                "comment": "Home Directories",
                "browseable": False,
                "create_mask": "0744",
                "directory_mask": "0755",
                'follow_symlinks': True,
                "read_only": True,
                "guest_ok": False,
                "path": "",
                'wide_links': False,
                "fstype": "",
                "force_create_mode": "000",
                "force_directory_mode": "000",
                "veto_files": "",
                "write_list": "",
                "dfree_command": "",
                "force_group": "",
                "force_user": "",
                "valid_users": "",
                "read_list": "",
                "dfree_cache_time": "",
            },
            {
                "name": "profiles",
                "comment": "Users profiles",
                "browseable": False,
                "create_mask": "0600",
                "directory_mask": "0700",
                'follow_symlinks': True,
                "read_only": True,
                "guest_ok": False,
                "path": "/home/samba/profiles",
                'wide_links': False,
                "fstype": "",
                "force_create_mode": "000",
                "force_directory_mode": "000",
                "veto_files": "",
                "write_list": "",
                "dfree_command": "",
                "force_group": "",
                "force_user": "",
                "valid_users": "",
                "read_list": "",
                "dfree_cache_time": "",
            }
        ]
    }

    config = SambaConfig


del BaseConfigTest