Add quick fix in notification troubleshot test to perform a Firebase token rotation
This commit is contained in:
parent
1f60509d92
commit
a6fdb90838
12 changed files with 243 additions and 33 deletions
|
|
@ -21,6 +21,8 @@ class FakePushProvider(
|
|||
private val currentUserPushConfig: CurrentUserPushConfig? = null,
|
||||
private val registerWithResult: (MatrixClient, Distributor) -> Result<Unit> = { _, _ -> lambdaError() },
|
||||
private val unregisterWithResult: (MatrixClient) -> Result<Unit> = { lambdaError() },
|
||||
private val canRotateTokenResult: () -> Boolean = { lambdaError() },
|
||||
private val rotateTokenLambda: () -> Result<Unit> = { lambdaError() },
|
||||
) : PushProvider {
|
||||
override fun getDistributors(): List<Distributor> = distributors
|
||||
|
||||
|
|
@ -39,4 +41,12 @@ class FakePushProvider(
|
|||
override suspend fun getCurrentUserPushConfig(): CurrentUserPushConfig? {
|
||||
return currentUserPushConfig
|
||||
}
|
||||
|
||||
override fun canRotateToken(): Boolean {
|
||||
return canRotateTokenResult()
|
||||
}
|
||||
|
||||
override suspend fun rotateToken(): Result<Unit> {
|
||||
return rotateTokenLambda()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue