[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.
- [libeufin] branch master updated (fe31400 -> 6144c4a), gnunet, 2021/10/06
- [libeufin] 01/07: Unix domain socket server., gnunet, 2021/10/06
- [libeufin] 02/07: Unix domain sockets dependencies, gnunet, 2021/10/06
- [libeufin] 03/07: adapt test to new API, gnunet, 2021/10/06
- [libeufin] 06/07: Unix domain socket proxy: fix payload read/write., gnunet, 2021/10/06
- [libeufin] 04/07: test for Unix domain socket,
gnunet <=
- [libeufin] 05/07: test dep, gnunet, 2021/10/06
- [libeufin] 07/07: Serve Sandbox via Unix domain socket., gnunet, 2021/10/06