[CalendarServer-changes] [7229] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 21 20:02:48 PDT 2011


Revision: 7229
          http://trac.macosforge.org/projects/calendarserver/changeset/7229
Author:   sagen at apple.com
Date:     2011-03-21 20:02:45 -0700 (Mon, 21 Mar 2011)
Log Message:
-----------
Update .well-known tests to take into account redirection to "main" port

Modified Paths:
--------------
    CalDAVTester/trunk/odsetup.py
    CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml
    CalDAVTester/trunk/scripts/server/serverinfo-template.xml
    CalDAVTester/trunk/scripts/server/serverinfo.xml
    CalDAVTester/trunk/scripts/server/sslserverinfo.xml
    CalDAVTester/trunk/scripts/tests/CalDAV/well-known.xml
    CalDAVTester/trunk/scripts/tests/CardDAV/well-known.xml

Modified: CalDAVTester/trunk/odsetup.py
===================================================================
--- CalDAVTester/trunk/odsetup.py	2011-03-21 18:38:34 UTC (rev 7228)
+++ CalDAVTester/trunk/odsetup.py	2011-03-22 03:02:45 UTC (rev 7229)
@@ -279,6 +279,7 @@
     sudoers = plist["SudoersFile"]
 
     port = plist["HTTPPort"]
+    sslport = plist["SSLPort"]
 
     try:
         basic_ok = plist["Authentication"]["Basic"]["Enabled"]
@@ -300,7 +301,7 @@
     if sudoers[0] != "/":
         sudoers = base_dir + sudoers
 
-    return hostname, port, authtype, docroot, sudoers
+    return hostname, port, sslport, authtype, docroot, sudoers
 
 def patchConfig(config, admin):
     """
@@ -350,7 +351,7 @@
         users.append({"username":"superuser", "password": "superuser"})
         writePlist(plist, sudoers)
 
-def buildServerinfo(serverinfo_default, hostname, port, authtype, docroot):
+def buildServerinfo(serverinfo_default, hostname, port, sslport, authtype, docroot):
     
     # Read in the serverinfo-template.xml file
     fd = open(serverinfo_template, "r")
@@ -390,6 +391,7 @@
     data = data % {
         "hostname"       : hostname,
         "port"           : str(port),
+        "sslport"        : str(sslport),
         "authtype"       : authtype,
         "overrides"      : subs_str,
     }
@@ -655,7 +657,7 @@
         
         if args[0] == "create":
             # Read the caldavd.plist file and extract some information we will need.
-            hostname, port, authtype, docroot, sudoers = readConfig(config)
+            hostname, port, sslport, authtype, docroot, sudoers = readConfig(config)
             
             # Patch the sudoers file for the superuser principal.
             patchSudoers(sudoers)
@@ -672,7 +674,7 @@
             patchConfig(config, "/principals/__uids__/%s/" % (guids["testadmin"],))
             
             # Create an appropriate serverinfo.xml file from the template
-            buildServerinfo(serverinfo_default, hostname, port, authtype, docroot)
+            buildServerinfo(serverinfo_default, hostname, port, sslport, authtype, docroot)
 
             # Add large calendars to user account
             if protocol == "caldav":
@@ -680,7 +682,7 @@
 
         elif args[0] == "create-users":
             # Read the caldavd.plist file and extract some information we will need.
-            hostname, port, authtype, docroot, sudoers = readConfig(config)
+            hostname, port, sslport, authtype, docroot, sudoers = readConfig(config)
             
             # Now generate the OD accounts (caching guids as we go).
             if protocol == "caldav":
@@ -690,7 +692,7 @@
             doToAccounts(config, protocol, createUser, users_only=True)
             
             # Create an appropriate serverinfo.xml file from the template
-            buildServerinfo(serverinfo_default, hostname, port, authtype, docroot)
+            buildServerinfo(serverinfo_default, hostname, port, sslport, authtype, docroot)
 
         elif args[0] == "remove":
             if protocol == "caldav":

Modified: CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml	2011-03-21 18:38:34 UTC (rev 7228)
+++ CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml	2011-03-22 03:02:45 UTC (rev 7229)
@@ -113,6 +113,10 @@
 			<key>$host:</key>
 			<value>http://localhost:8008</value>
 		</substitution>
+		<substitution>
+			<key>$hostssl:</key>
+			<value>https://localhost:8443</value>
+		</substitution>
 
 		<!-- relative path to caldav root-->
 		<substitution>

Modified: CalDAVTester/trunk/scripts/server/serverinfo-template.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo-template.xml	2011-03-21 18:38:34 UTC (rev 7228)
+++ CalDAVTester/trunk/scripts/server/serverinfo-template.xml	2011-03-22 03:02:45 UTC (rev 7229)
@@ -115,6 +115,10 @@
 			<key>$host:</key>
 			<value>http://%(hostname)s:%(port)s</value>
 		</substitution>
+		<substitution>
+			<key>$hostssl:</key>
+			<value>https://%(hostname)s:%(sslport)s</value>
+		</substitution>
 
 		<!-- relative path to caldav root-->
 		<substitution>

Modified: CalDAVTester/trunk/scripts/server/serverinfo.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo.xml	2011-03-21 18:38:34 UTC (rev 7228)
+++ CalDAVTester/trunk/scripts/server/serverinfo.xml	2011-03-22 03:02:45 UTC (rev 7229)
@@ -115,6 +115,10 @@
 			<key>$host:</key>
 			<value>http://localhost:8008</value>
 		</substitution>
+		<substitution>
+			<key>$hostssl:</key>
+			<value>https://localhost:8443</value>
+		</substitution>
 
 		<!-- relative path to caldav root-->
 		<substitution>

Modified: CalDAVTester/trunk/scripts/server/sslserverinfo.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/sslserverinfo.xml	2011-03-21 18:38:34 UTC (rev 7228)
+++ CalDAVTester/trunk/scripts/server/sslserverinfo.xml	2011-03-22 03:02:45 UTC (rev 7229)
@@ -112,8 +112,12 @@
 		<!-- Server configuration settings -->
 		<substitution>
 			<key>$host:</key>
-			<value>http://localhost:8443</value>
+			<value>https://localhost:8443</value>
 		</substitution>
+		<substitution>
+			<key>$hostssl:</key>
+			<value>https://localhost:8443</value>
+		</substitution>
 
 		<!-- relative path to caldav root-->
 		<substitution>

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/well-known.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/well-known.xml	2011-03-21 18:38:34 UTC (rev 7228)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/well-known.xml	2011-03-22 03:02:45 UTC (rev 7229)
@@ -65,7 +65,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>Location$$host:/</value>
+						<value>Location$$hostssl:/</value>
 					</arg>
 				</verify>
 			</request>
@@ -86,7 +86,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>Location$$host:/</value>
+						<value>Location$$hostssl:/</value>
 					</arg>
 				</verify>
 			</request>
@@ -142,7 +142,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>Location$$host:/</value>
+						<value>Location$$hostssl:/</value>
 					</arg>
 				</verify>
 			</request>
@@ -167,7 +167,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>Location$$host:/</value>
+						<value>Location$$hostssl:/</value>
 					</arg>
 				</verify>
 			</request>

Modified: CalDAVTester/trunk/scripts/tests/CardDAV/well-known.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/well-known.xml	2011-03-21 18:38:34 UTC (rev 7228)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/well-known.xml	2011-03-22 03:02:45 UTC (rev 7229)
@@ -65,7 +65,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>Location$$host:/</value>
+						<value>Location$$hostssl:/</value>
 					</arg>
 				</verify>
 			</request>
@@ -86,7 +86,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>Location$$host:/</value>
+						<value>Location$$hostssl:/</value>
 					</arg>
 				</verify>
 			</request>
@@ -142,7 +142,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>Location$$host:/</value>
+						<value>Location$$hostssl:/</value>
 					</arg>
 				</verify>
 			</request>
@@ -167,7 +167,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>Location$$host:/</value>
+						<value>Location$$hostssl:/</value>
 					</arg>
 				</verify>
 			</request>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110321/4d126c9b/attachment-0001.html>


More information about the calendarserver-changes mailing list