From 74694046708c355468002603b58d760a017ffe86 Mon Sep 17 00:00:00 2001 From: dizyaa Date: Thu, 19 Jan 2023 17:56:40 +0400 Subject: [PATCH] Fix BeforeRepoAllTestsExtension.kt --- .../gitnuro/app/git/BeforeRepoAllTestsExtension.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/test/kotlin/com/jetpackduba/gitnuro/app/git/BeforeRepoAllTestsExtension.kt b/src/test/kotlin/com/jetpackduba/gitnuro/app/git/BeforeRepoAllTestsExtension.kt index ec9ffb5..dd82934 100644 --- a/src/test/kotlin/com/jetpackduba/gitnuro/app/git/BeforeRepoAllTestsExtension.kt +++ b/src/test/kotlin/com/jetpackduba/gitnuro/app/git/BeforeRepoAllTestsExtension.kt @@ -4,6 +4,7 @@ import com.jetpackduba.gitnuro.credentials.* import com.jetpackduba.gitnuro.di.factories.HttpCredentialsFactory import com.jetpackduba.gitnuro.git.remote_operations.CloneRepositoryUseCase import com.jetpackduba.gitnuro.git.remote_operations.HandleTransportUseCase +import com.jetpackduba.gitnuro.ssh.libssh.LibSshSession import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.runBlocking @@ -36,7 +37,13 @@ class BeforeRepoAllTestsExtension : BeforeAllCallback, AfterAllCallback { val cloneRepositoryUseCase = CloneRepositoryUseCase( HandleTransportUseCase( - sessionManager = GSessionManager { GRemoteSession({ GProcess() }, credentialsStateManager) }, + sessionManager = GSessionManager { + GRemoteSession( + processProvider = { GProcess() }, + credentialsStateManager = credentialsStateManager, + processSession = { LibSshSession() } + ) + }, httpCredentialsProvider = object : HttpCredentialsFactory { override fun create(git: Git?): HttpCredentialsProvider = HttpCredentialsProvider(credentialsStateManager, git)