summaryrefslogtreecommitdiff
path: root/reconfigure/tests/configs/samba_tests.py
diff options
context:
space:
mode:
authorAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:26 +0200
committerAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:26 +0200
commitff1408420159488a106492ccd11dd234967029b6 (patch)
tree473420cee1c5229a427ec4cafead1aa6c0a26800 /reconfigure/tests/configs/samba_tests.py
Imported Upstream version 0.1.29
Diffstat (limited to 'reconfigure/tests/configs/samba_tests.py')
-rw-r--r--reconfigure/tests/configs/samba_tests.py70
1 files changed, 70 insertions, 0 deletions
diff --git a/reconfigure/tests/configs/samba_tests.py b/reconfigure/tests/configs/samba_tests.py
new file mode 100644
index 0000000..c6ce44c
--- /dev/null
+++ b/reconfigure/tests/configs/samba_tests.py
@@ -0,0 +1,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