Add quick fix in notification troubleshot test to perform a Firebase token rotation
This commit is contained in:
parent
4aa1afec5a
commit
6bde224695
12 changed files with 243 additions and 33 deletions
|
|
@ -52,9 +52,10 @@ class PushLoopbackTest @Inject constructor(
|
|||
val testPushResult = try {
|
||||
pushService.testPush()
|
||||
} catch (pusherRejected: PushGatewayFailure.PusherRejected) {
|
||||
val hasQuickFix = pushService.getCurrentPushProvider()?.canRotateToken() == true
|
||||
delegate.updateState(
|
||||
description = stringProvider.getString(R.string.troubleshoot_notifications_test_push_loop_back_failure_1),
|
||||
status = NotificationTroubleshootTestState.Status.Failure(false)
|
||||
status = NotificationTroubleshootTestState.Status.Failure(hasQuickFix)
|
||||
)
|
||||
job.cancel()
|
||||
return
|
||||
|
|
@ -96,5 +97,11 @@ class PushLoopbackTest @Inject constructor(
|
|||
)
|
||||
}
|
||||
|
||||
override suspend fun quickFix(coroutineScope: CoroutineScope) {
|
||||
delegate.start()
|
||||
pushService.getCurrentPushProvider()?.rotateToken()
|
||||
run(coroutineScope)
|
||||
}
|
||||
|
||||
override suspend fun reset() = delegate.reset()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue