summaryrefslogtreecommitdiff
path: root/reconfigure/tests/configs/samba_tests.py
blob: c6ce44c46d0274ac45f58f5077357c675a9bf64f (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
from reconfigure.configs import SambaConfig
from 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,
            },
            {
                "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
            }
        ]
    }

    config = SambaConfig


del BaseConfigTest