Links the Tor okhttpclient with nests
This commit is contained in:
+3
-3
@@ -99,7 +99,7 @@ class OkHttpNestsClientRateLimitTest {
|
||||
server.enqueue(success(token = "T1"))
|
||||
|
||||
try {
|
||||
val client = OkHttpNestsClient(http = OkHttpClient())
|
||||
val client = OkHttpNestsClient(httpClient = { OkHttpClient() })
|
||||
val token =
|
||||
client.mintToken(
|
||||
room = roomConfig(server.baseUrl),
|
||||
@@ -122,7 +122,7 @@ class OkHttpNestsClientRateLimitTest {
|
||||
repeat(MAX_RATE_LIMIT_RETRIES + 2) { server.enqueue(rateLimited(retryAfterSeconds = 0)) }
|
||||
|
||||
try {
|
||||
val client = OkHttpNestsClient(http = OkHttpClient())
|
||||
val client = OkHttpNestsClient(httpClient = { OkHttpClient() })
|
||||
val ex =
|
||||
assertFailsWith<NestsException> {
|
||||
client.mintToken(
|
||||
@@ -149,7 +149,7 @@ class OkHttpNestsClientRateLimitTest {
|
||||
server.enqueue(StubResponse(401, "Unauthorized", body = "{\"error\":\"bad sig\"}"))
|
||||
|
||||
try {
|
||||
val client = OkHttpNestsClient(http = OkHttpClient())
|
||||
val client = OkHttpNestsClient(httpClient = { OkHttpClient() })
|
||||
val ex =
|
||||
assertFailsWith<NestsException> {
|
||||
client.mintToken(
|
||||
|
||||
+2
-2
@@ -140,7 +140,7 @@ class NostrNestsAuthFailureInteropTest {
|
||||
// Per moq-auth's regex /^nests\/\d+:[0-9a-f]{64}:[a-zA-Z0-9._-]+$/
|
||||
// — uppercase pubkey hex doesn't match the `[0-9a-f]` class.
|
||||
val signer = NostrSignerInternal(KeyPair())
|
||||
val client = OkHttpNestsClient(http = http)
|
||||
val client = OkHttpNestsClient(httpClient = { http })
|
||||
val room =
|
||||
NestsRoomConfig(
|
||||
authBaseUrl = harness.authBaseUrl,
|
||||
@@ -171,7 +171,7 @@ class NostrNestsAuthFailureInteropTest {
|
||||
// with `put: [<their-pubkey>]`. Lock that in so a future
|
||||
// hostlist gate doesn't sneak in unnoticed.
|
||||
val signer = NostrSignerInternal(KeyPair())
|
||||
val client = OkHttpNestsClient(http = http)
|
||||
val client = OkHttpNestsClient(httpClient = { http })
|
||||
val room =
|
||||
NestsRoomConfig(
|
||||
authBaseUrl = harness.authBaseUrl,
|
||||
|
||||
Reference in New Issue
Block a user