Skip to content

Commit c7cab9c

Browse files
committed
make sure the tests run on local
1 parent e44fe6d commit c7cab9c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library/src/androidTest/java/org/xmtp/android/library/TestHelpers.kt

+6-1
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ class FakeApiClient : ApiClient {
175175
MessageApiOuterClass.SortDirection.SORT_DIRECTION_ASCENDING -> {
176176
result = result.reversed().toMutableList()
177177
}
178+
178179
else -> Unit
179180
}
180181
}
@@ -191,6 +192,7 @@ class FakeApiClient : ApiClient {
191192
published.addAll(envelopes)
192193
return PublishResponse.newBuilder().build()
193194
}
195+
194196
override suspend fun subscribe(request: Flow<MessageApiOuterClass.SubscribeRequest>): Flow<MessageApiOuterClass.Envelope> {
195197
val env = stream.counts().first()
196198

@@ -205,7 +207,9 @@ data class Fixtures(
205207
val aliceAccount: PrivateKeyBuilder,
206208
val bobAccount: PrivateKeyBuilder,
207209
val caroAccount: PrivateKeyBuilder,
208-
val clientOptions: ClientOptions? = null
210+
val clientOptions: ClientOptions? = ClientOptions(
211+
ClientOptions.Api(XMTPEnvironment.LOCAL, isSecure = false)
212+
),
209213
) {
210214
var fakeApiClient: FakeApiClient = FakeApiClient()
211215
var alice: PrivateKey = aliceAccount.getPrivateKey()
@@ -214,6 +218,7 @@ data class Fixtures(
214218
var bobClient: Client = Client().create(account = bobAccount, options = clientOptions)
215219
var caro: PrivateKey = caroAccount.getPrivateKey()
216220
var caroClient: Client = Client().create(account = caroAccount, options = clientOptions)
221+
217222
constructor(clientOptions: ClientOptions?) : this(
218223
aliceAccount = PrivateKeyBuilder(),
219224
bobAccount = PrivateKeyBuilder(),

0 commit comments

Comments
 (0)