james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r452100 - in /james/server/trunk: include.properties lib/jspf-0.9-SNAPSHOT.jar lib/jspf-0.9b3.jar pom.xml src/test/org/apache/james/smtpserver/SPFHandlerTest.java
Date Mon, 02 Oct 2006 16:06:03 GMT
Author: bago
Date: Mon Oct  2 09:06:02 2006
New Revision: 452100

URL: http://svn.apache.org/viewvc?view=rev&rev=452100
Log:
Updated pom to use people.apache.org instead of minotaur.
Updated jspf to snapshot release (updated also tests for our new interfaces)

Added:
    james/server/trunk/lib/jspf-0.9-SNAPSHOT.jar   (with props)
Removed:
    james/server/trunk/lib/jspf-0.9b3.jar
Modified:
    james/server/trunk/include.properties
    james/server/trunk/pom.xml
    james/server/trunk/src/test/org/apache/james/smtpserver/SPFHandlerTest.java

Modified: james/server/trunk/include.properties
URL: http://svn.apache.org/viewvc/james/server/trunk/include.properties?view=diff&rev=452100&r1=452099&r2=452100
==============================================================================
--- james/server/trunk/include.properties (original)
+++ james/server/trunk/include.properties Mon Oct  2 09:06:02 2006
@@ -88,7 +88,7 @@
 bcmail-workaround.jar=bcmail-jdk14-129-workaround.jar
 
 # ----- jSPF -----
-jspf.jar=jspf-0.9b3.jar
+jspf.jar=jspf-0.9-SNAPSHOT.jar
 
 # ----- mstor -----
 mstor.jar=mstor.jar

Added: james/server/trunk/lib/jspf-0.9-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/james/server/trunk/lib/jspf-0.9-SNAPSHOT.jar?view=auto&rev=452100
==============================================================================
Binary file - no diff available.

Propchange: james/server/trunk/lib/jspf-0.9-SNAPSHOT.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: james/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/pom.xml?view=diff&rev=452100&r1=452099&r2=452100
==============================================================================
--- james/server/trunk/pom.xml (original)
+++ james/server/trunk/pom.xml Mon Oct  2 09:06:02 2006
@@ -136,7 +136,7 @@
     <dependency>
       <groupId>org.apache.james</groupId>
       <artifactId>jspf</artifactId>
-      <version>0.9-20060922.184819-1</version>
+      <version>0.9-SNAPSHOT</version>
     </dependency>
 
     <dependency>
@@ -378,8 +378,8 @@
 
   <distributionManagement>
     <site>
-      <id>server-website</id>
-      <url>scp://minotaur.apache.org/www/james.apache.org/server/2.3.0/</url>
+      <id>server-trunk-website</id>
+      <url>scp://people.apache.org/www/james.apache.org/server/trunk/</url>
     </site>
   </distributionManagement>
 

Modified: james/server/trunk/src/test/org/apache/james/smtpserver/SPFHandlerTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/test/org/apache/james/smtpserver/SPFHandlerTest.java?view=diff&rev=452100&r1=452099&r2=452100
==============================================================================
--- james/server/trunk/src/test/org/apache/james/smtpserver/SPFHandlerTest.java (original)
+++ james/server/trunk/src/test/org/apache/james/smtpserver/SPFHandlerTest.java Mon Oct  2
09:06:02 2006
@@ -20,16 +20,13 @@
 
 package org.apache.james.smtpserver;
 
+import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Map;
-
 import java.util.List;
+import java.util.Map;
 
 import org.apache.avalon.framework.container.ContainerUtil;
 import org.apache.james.jspf.core.DNSService;
-import org.apache.james.jspf.exceptions.NoneException;
-import org.apache.james.jspf.exceptions.PermErrorException;
-import org.apache.james.jspf.exceptions.TempErrorException;
 import org.apache.james.smtpserver.core.filter.fastfail.SPFHandler;
 import org.apache.james.test.mock.avalon.MockLogger;
 import org.apache.james.test.mock.mailet.MockMail;
@@ -71,66 +68,11 @@
     private void setupMockedDnsService() {
         mockedDnsService = new DNSService() {
 
-            public List getAAAARecords(String arg0)
-                    throws NoneException, PermErrorException,
-                    TempErrorException {
-                throw new UnsupportedOperationException(
-                        "Unimplemented mock service");
-            }
-
-            public List getARecords(String arg0)
-                    throws NoneException, PermErrorException,
-                    TempErrorException {
-                throw new UnsupportedOperationException(
-                        "Unimplemented mock service");
-            }
-
             public List getLocalDomainNames() {
                 throw new UnsupportedOperationException(
                         "Unimplemented mock service");
             }
 
-            public List getMXRecords(String arg0)
-                    throws PermErrorException, NoneException,
-                    TempErrorException {
-                throw new UnsupportedOperationException(
-                        "Unimplemented mock service");
-            }
-
-            public List getPTRRecords(String arg0) throws PermErrorException,
-                    NoneException, TempErrorException {
-                throw new UnsupportedOperationException(
-                        "Unimplemented mock service");
-            }
-
-            public String getSpfRecord(String host, String version)
-                    throws PermErrorException, NoneException,
-                    TempErrorException {
-                if (host.equals("spf1.james.apache.org")) {
-                    // pass
-                    return "v=spf1 +all";
-                } else if (host.equals("spf2.james.apache.org")) {
-                    // fail
-                    return "v=spf1 -all";
-                } else if (host.equals("spf3.james.apache.org")) {
-                    // softfail
-                    return "v=spf1 ~all";
-                } else if (host.equals("spf4.james.apache.org")) {
-                    // permerror
-                    throw new PermErrorException("junit permerror test");
-                } else if (host.equals("spf5.james.apache.org")) {
-                    throw new TempErrorException("junit temperror test");
-                } else {
-                    throw new NoneException("junit noneerror test");
-                }
-            }
-
-            public String getTxtCatType(String arg0) throws NoneException,
-                    PermErrorException, TempErrorException {
-                throw new UnsupportedOperationException(
-                        "Unimplemented mock service");
-            }
-
             public void setTimeOut(int arg0) {
                 // do nothing
             }
@@ -142,6 +84,39 @@
             public void setRecordLimit(int arg0) {
                 throw new UnsupportedOperationException(
                 "Unimplemented mock service");
+            }
+
+            public List getRecords(String host, int type) throws TimeoutException {
+                switch (type) {
+                    case DNSService.TXT:
+                    case DNSService.SPF:
+                        List l = new ArrayList();
+                        if (host.equals("spf1.james.apache.org")) {
+                            // pass
+                            l.add("v=spf1 +all");
+                            return l;
+                        } else if (host.equals("spf2.james.apache.org")) {
+                            // fail
+                            l.add("v=spf1 -all");
+                            return l;
+                        } else if (host.equals("spf3.james.apache.org")) {
+                            // softfail
+                            l.add("v=spf1 ~all");
+                            return l;
+                        } else if (host.equals("spf4.james.apache.org")) {
+                            // permerror
+                            l.add("v=spf1 badcontent!");
+                            return l;
+                        } else if (host.equals("spf5.james.apache.org")) {
+                            // temperror
+                            throw new TimeoutException();
+                        } else {
+                            return null;
+                        }
+                    default:
+                        throw new UnsupportedOperationException(
+                        "Unimplemented mock service");
+                }
             }
 
         };



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message