[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Testing token with forever duration.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Testing token with forever duration. |
Date: |
Fri, 29 Sep 2023 12:24:28 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 7e6bed1a Testing token with forever duration.
7e6bed1a is described below
commit 7e6bed1a0cc09950198a84fe5977b8ed8f40091b
Author: MS <ms@taler.net>
AuthorDate: Fri Sep 29 12:23:53 2023 +0200
Testing token with forever duration.
---
bank/src/test/kotlin/LibeuFinApiTest.kt | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/bank/src/test/kotlin/LibeuFinApiTest.kt
b/bank/src/test/kotlin/LibeuFinApiTest.kt
index 18020481..a1d29720 100644
--- a/bank/src/test/kotlin/LibeuFinApiTest.kt
+++ b/bank/src/test/kotlin/LibeuFinApiTest.kt
@@ -3,6 +3,7 @@ import io.ktor.client.request.*
import io.ktor.client.statement.*
import io.ktor.http.*
import io.ktor.server.testing.*
+import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import net.taler.wallet.crypto.Base32Crockford
import org.junit.Test
@@ -249,6 +250,18 @@ class LibeuFinApiTest {
setBody("{\"scope\": \"readonly\"}")
expectSuccess = true
}
+ // Testing the 'forever' case.
+ val forever = client.post("/accounts/foo/token") {
+ expectSuccess = true
+ contentType(ContentType.Application.Json)
+ basicAuth("foo", "pw")
+ setBody("""{
+ "scope": "readonly",
+ "duration": {"d_us": "forever"}
+ }""".trimIndent())
+ }
+ val never: TokenSuccessResponse =
Json.decodeFromString(forever.bodyAsText())
+ assert(never.expiration.t_s == Instant.MAX)
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Testing token with forever duration.,
gnunet <=