summaryrefslogtreecommitdiff
path: root/reconfigure/tests/configs/exports_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/exports_tests.py
Imported Upstream version 0.1.29
Diffstat (limited to 'reconfigure/tests/configs/exports_tests.py')
-rw-r--r--reconfigure/tests/configs/exports_tests.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/reconfigure/tests/configs/exports_tests.py b/reconfigure/tests/configs/exports_tests.py
new file mode 100644
index 0000000..be85736
--- /dev/null
+++ b/reconfigure/tests/configs/exports_tests.py
@@ -0,0 +1,45 @@
+from reconfigure.configs import ExportsConfig
+from base_test import BaseConfigTest
+
+
+class ExportsConfigTest (BaseConfigTest):
+ sources = {
+ None: """
+/another/exported/directory 192.168.0.3(rw,sync) \
+192.168.0.4(ro) # test
+/one 192.168.0.1 # comment
+"""
+ }
+ result = {
+ "exports": [
+ {
+ "comment": "test",
+ "name": '/another/exported/directory',
+ "clients": [
+ {
+ "name": "192.168.0.3",
+ "options": "rw,sync"
+ },
+ {
+ "name": "192.168.0.4",
+ "options": "ro"
+ }
+ ]
+ },
+ {
+ "comment": "comment",
+ "name": '/one',
+ "clients": [
+ {
+ "name": "192.168.0.1",
+ "options": ""
+ }
+ ]
+ }
+ ]
+ }
+
+ config = ExportsConfig
+
+
+del BaseConfigTest