summaryrefslogtreecommitdiff
path: root/reconfigure/tests/configs/squid_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'reconfigure/tests/configs/squid_tests.py')
-rw-r--r--reconfigure/tests/configs/squid_tests.py63
1 files changed, 63 insertions, 0 deletions
diff --git a/reconfigure/tests/configs/squid_tests.py b/reconfigure/tests/configs/squid_tests.py
new file mode 100644
index 0000000..011d4bf
--- /dev/null
+++ b/reconfigure/tests/configs/squid_tests.py
@@ -0,0 +1,63 @@
+from reconfigure.configs import SquidConfig
+from base_test import BaseConfigTest
+
+
+class SquidConfigTest (BaseConfigTest):
+ sources = {
+ None: """acl manager proto cache_object
+acl SSL_ports port 443
+http_access deny CONNECT !SSL_ports
+http_port 3128
+"""
+ }
+ result = {
+ "http_access": [
+ {
+ "mode": "deny",
+ "options": [
+ {
+ "value": "CONNECT"
+ },
+ {
+ "value": "!SSL_ports"
+ }
+ ]
+ }
+ ],
+ "http_port": [
+ {
+ "options": [],
+ "port": "3128"
+ }
+ ],
+ "https_port": [],
+ "acl": [
+ {
+ "name": "manager",
+ "options": [
+ {
+ "value": "proto"
+ },
+ {
+ "value": "cache_object"
+ }
+ ]
+ },
+ {
+ "name": "SSL_ports",
+ "options": [
+ {
+ "value": "port"
+ },
+ {
+ "value": "443"
+ }
+ ]
+ }
+ ]
+ }
+
+ config = SquidConfig
+
+
+del BaseConfigTest