You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2021/11/01 04:20:53 UTC

[james-project] 08/08: JAMES-3539 Fix WebPushClient

This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 7a8335fbced26a7db3d4885eda346250486b33f5
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Oct 29 16:57:38 2021 +0700

    JAMES-3539 Fix WebPushClient
---
 .../james/jmap/pushsubscription/PushServerExtension.scala  | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/pushsubscription/PushServerExtension.scala b/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/pushsubscription/PushServerExtension.scala
index 13b0022..fde195c 100644
--- a/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/pushsubscription/PushServerExtension.scala
+++ b/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/pushsubscription/PushServerExtension.scala
@@ -71,7 +71,6 @@ object MockPushServer {
         .withMethod("POST")
         .withHeader(string("Content-type"), string("application/json charset=utf-8"))
         .withHeader(string("Urgency"))
-        .withHeader(string("Content-Encoding"))
         .withHeader(string("Topic"))
         .withHeader(string("TTL")))
       .respond(response
@@ -79,5 +78,18 @@ object MockPushServer {
         .withHeader("Location", String.format("https://push.example.net/message/%s", UUID.randomUUID))
         .withHeader("Date", Clock.systemUTC.toString)
         .withBody(UUID.randomUUID.toString))
+
+    mockServer
+      .when(request
+        .withPath("/push")
+        .withMethod("POST")
+        .withHeader(string("Content-type"), string("application/json charset=utf-8"))
+        .withHeader(string("Content-Encoding"))
+        .withHeader(string("TTL")))
+      .respond(response
+        .withStatusCode(201)
+        .withHeader("Location", String.format("https://push.example.net/message/%s", UUID.randomUUID))
+        .withHeader("Date", Clock.systemUTC.toString)
+        .withBody(UUID.randomUUID.toString))
   }
 }

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