james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [1/2] james-jdkim git commit: JDKIM-39 Upgrade Apache Mailet dependency
Date Tue, 26 Jun 2018 03:37:36 GMT
Repository: james-jdkim
Updated Branches:
  refs/heads/master 121c6ed91 -> edd78234f


JDKIM-39 Upgrade Apache Mailet dependency


Project: http://git-wip-us.apache.org/repos/asf/james-jdkim/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-jdkim/commit/35acb180
Tree: http://git-wip-us.apache.org/repos/asf/james-jdkim/tree/35acb180
Diff: http://git-wip-us.apache.org/repos/asf/james-jdkim/diff/35acb180

Branch: refs/heads/master
Commit: 35acb1807227e2c87a8690edafdc943bfbd7f1a1
Parents: 121c6ed
Author: Antoine Duprat <aduprat@linagora.com>
Authored: Mon Jun 11 12:32:08 2018 +0200
Committer: Antoine Duprat <aduprat@linagora.com>
Committed: Mon Jun 11 12:32:08 2018 +0200

----------------------------------------------------------------------
 .../james/jdkim/mailets/DKIMSignTest.java       | 78 +++++++++++---------
 .../james/jdkim/mailets/DKIMVerifyTest.java     |  7 +-
 pom.xml                                         |  2 +-
 3 files changed, 49 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/35acb180/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMSignTest.java
----------------------------------------------------------------------
diff --git a/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMSignTest.java b/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMSignTest.java
index 41297be..2e46dd0 100644
--- a/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMSignTest.java
+++ b/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMSignTest.java
@@ -72,13 +72,14 @@ public class DKIMSignTest {
 
         Mailet mailet = new DKIMSign();
 
-        FakeMailetConfig mci = new FakeMailetConfig("Test",
-            FAKE_MAIL_CONTEXT);
-        mci
+        FakeMailetConfig mci = FakeMailetConfig.builder()
+                .mailetName("Test")
+                .mailetContext(FAKE_MAIL_CONTEXT)
                 .setProperty(
                         "signatureTemplate",
-                        "v=1; s=selector; d=example.com; h=from:to:received:received; a=rsa-sha256;
bh=; b=;");
-        mci.setProperty("privateKey", TESTING_PEM);
+                        "v=1; s=selector; d=example.com; h=from:to:received:received; a=rsa-sha256;
bh=; b=;")
+                .setProperty("privateKey", TESTING_PEM)
+                .build();
 
         mailet.init(mci);
 
@@ -119,10 +120,14 @@ public class DKIMSignTest {
 
         Mailet mailet = new DKIMSign();
 
-        FakeMailetConfig mci = new FakeMailetConfig("Test", FAKE_MAIL_CONTEXT);
-        mci.setProperty("signatureTemplate",
-                "v=1; t=" + ((System.currentTimeMillis() / 1000) + 1000) + "; s=selector;
d=example.com; h=from:to:received:received; a=rsa-sha256; bh=; b=;");
-        mci.setProperty("privateKey", TESTING_PEM);
+        FakeMailetConfig mci = FakeMailetConfig.builder()
+                .mailetName("Test")
+                .mailetContext(FAKE_MAIL_CONTEXT)
+                .setProperty(
+                        "signatureTemplate",
+                        "v=1; t=" + ((System.currentTimeMillis() / 1000) + 1000) + "; s=selector;
d=example.com; h=from:to:received:received; a=rsa-sha256; bh=; b=;")
+                .setProperty("privateKey", TESTING_PEM)
+                .build();
 
         mailet.init(mci);
 
@@ -160,12 +165,14 @@ public class DKIMSignTest {
 
         Mailet mailet = new DKIMSign();
 
-        FakeMailetConfig mci = new FakeMailetConfig("Test", FAKE_MAIL_CONTEXT);
-        mci
+        FakeMailetConfig mci = FakeMailetConfig.builder()
+                .mailetName("Test")
+                .mailetContext(FAKE_MAIL_CONTEXT)
                 .setProperty(
                         "signatureTemplate",
-                        "v=1; t=; s=selector; d=example.com; h=from:to:received:received;
a=rsa-sha256; bh=; b=;");
-        mci.setProperty("privateKey", TESTING_PEM);
+                        "v=1; t=; s=selector; d=example.com; h=from:to:received:received;
a=rsa-sha256; bh=; b=;")
+                .setProperty("privateKey", TESTING_PEM)
+                .build();
 
         mailet.init(mci);
 
@@ -210,15 +217,14 @@ public class DKIMSignTest {
 
         Mailet mailet = new DKIMSign();
 
-        FakeMailetConfig mci = new FakeMailetConfig("Test", FAKE_MAIL_CONTEXT);
-        mci
+        FakeMailetConfig mci = FakeMailetConfig.builder()
+                .mailetName("Test")
+                .mailetContext(FAKE_MAIL_CONTEXT)
                 .setProperty(
                         "signatureTemplate",
-                        "v=1; s=selector; d=example.com; h=from:to:received:received; a=rsa-sha256;
bh=; b=;");
-        mci
-                .setProperty(
-                        "privateKey",
-                        TESTING_PEM);
+                        "v=1; s=selector; d=example.com; h=from:to:received:received; a=rsa-sha256;
bh=; b=;")
+                .setProperty("privateKey", TESTING_PEM)
+                .build();
 
         mailet.init(mci);
 
@@ -257,13 +263,15 @@ public class DKIMSignTest {
 
         FakeMailContext FakeMailContext = FAKE_MAIL_CONTEXT;
         FakeMailContext.getServerInfo();
-        FakeMailetConfig mci = new FakeMailetConfig("Test", FakeMailContext);
-        mci.setProperty(
-                "signatureTemplate",
-                "v=1; s=selector; d=example.com; h=from:to:received:received; a=rsa-sha256;
bh=; b=;");
-        mci.setProperty(
-                "privateKey",
-                TESTING_PEM);
+
+        FakeMailetConfig mci = FakeMailetConfig.builder()
+                .mailetName("Test")
+                .mailetContext(FAKE_MAIL_CONTEXT)
+                .setProperty(
+                        "signatureTemplate",
+                        "v=1; s=selector; d=example.com; h=from:to:received:received; a=rsa-sha256;
bh=; b=;")
+                .setProperty("privateKey", TESTING_PEM)
+                .build();
 
         Mail mail = FakeMail.builder()
             .mimeMessage(mm)
@@ -303,13 +311,15 @@ public class DKIMSignTest {
 
         FakeMailContext FakeMailContext = FAKE_MAIL_CONTEXT;
         FakeMailContext.getServerInfo();
-        FakeMailetConfig mci = new FakeMailetConfig("Test", FakeMailContext);
-        mci.setProperty(
-                "signatureTemplate",
-                "v=1; s=selector; d=example.com; h=from:to:received:received; a=rsa-sha256;
bh=; b=;");
-        mci.setProperty(
-                "privateKey",
-                TESTING_PEM);
+
+        FakeMailetConfig mci = FakeMailetConfig.builder()
+                .mailetName("Test")
+                .mailetContext(FAKE_MAIL_CONTEXT)
+                .setProperty(
+                        "signatureTemplate",
+                        "v=1; s=selector; d=example.com; h=from:to:received:received; a=rsa-sha256;
bh=; b=;")
+                .setProperty("privateKey", TESTING_PEM)
+                .build();
 
         Mail mail = FakeMail.builder()
             .mimeMessage(mm)

http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/35acb180/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMVerifyTest.java
----------------------------------------------------------------------
diff --git a/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMVerifyTest.java b/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMVerifyTest.java
index 7e708d4..cf4129a 100644
--- a/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMVerifyTest.java
+++ b/mailets/src/test/java/org/apache/james/jdkim/mailets/DKIMVerifyTest.java
@@ -27,8 +27,6 @@ import javax.mail.MessagingException;
 import javax.mail.Session;
 import javax.mail.internet.MimeMessage;
 
-import junit.framework.TestCase;
-
 import org.apache.james.jdkim.DKIMVerifier;
 import org.apache.james.jdkim.MockPublicKeyRecordRetriever;
 import org.apache.james.jdkim.exceptions.FailException;
@@ -109,7 +107,10 @@ public class DKIMVerifyTest {
             
         };
 
-        FakeMailetConfig mci = new FakeMailetConfig("Test", FakeMailContext.defaultContext());
+        FakeMailetConfig mci = FakeMailetConfig.builder()
+                .mailetName("Test")
+                .mailetContext(FakeMailContext.defaultContext())
+                .build();
 
         mailet.init(mci);
 

http://git-wip-us.apache.org/repos/asf/james-jdkim/blob/35acb180/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index eef329b..ace72d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -67,7 +67,7 @@
         <geronimo-javamail.version>1.8.3</geronimo-javamail.version>
         <commons-codec.version>1.7</commons-codec.version>
         <commons-logging.version>1.1.1</commons-logging.version>
-        <apache-mailet.version>3.0.0-beta5</apache-mailet.version>
+        <apache-mailet.version>3.1.0-SNAPSHOT</apache-mailet.version>
         <dnsjava.version>2.1.1</dnsjava.version>
         <not-yet-commons-ssl.version>0.3.11</not-yet-commons-ssl.version>
         <apache-mime4j.version>0.8.1</apache-mime4j.version>


---------------------------------------------------------------------
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