gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] 04/07: test for Unix domain socket


From: gnunet
Subject: [libeufin] 04/07: test for Unix domain socket
Date: Wed, 06 Oct 2021 16:17:55 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

commit e1c7fdfac9788a85077610b2767021c2d688eeb6
Author: ms <ms@taler.net>
AuthorDate: Wed Oct 6 14:35:41 2021 +0200

    test for Unix domain socket
---
 util/src/test/kotlin/DomainSocketTest.kt | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/util/src/test/kotlin/DomainSocketTest.kt 
b/util/src/test/kotlin/DomainSocketTest.kt
new file mode 100644
index 0000000..d6e5c18
--- /dev/null
+++ b/util/src/test/kotlin/DomainSocketTest.kt
@@ -0,0 +1,30 @@
+import io.ktor.application.*
+import io.ktor.features.*
+import io.ktor.http.*
+import io.ktor.response.*
+import io.ktor.routing.*
+import org.junit.Test
+import io.ktor.jackson.jackson
+import io.ktor.request.*
+
+class DomainSocketTest {
+    // @Test
+    fun bind() {
+        startServer("/tmp/java.sock") {
+            install(ContentNegotiation) { jackson() }
+            routing {
+                // responds with a empty JSON object.
+                get("/") {
+                    this.call.respond(object {})
+                    return@get
+                }
+                // echoes what it read in the request.
+                post("/") {
+                    val body = this.call.receiveText()
+                    this.call.respondText(body)
+                    return@post
+                }
+            }
+        }
+    }
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]