mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git tests: fix auth failure assertion for old Gits
Git prior to 1.8.3 (d5ccbe4) didn't report the URL for which the authentication failed.
This commit is contained in:
@@ -21,6 +21,7 @@ import com.intellij.util.ThrowableRunnable
|
||||
import git4idea.checkout.GitCheckoutProvider
|
||||
import git4idea.commands.GitHttpAuthService
|
||||
import git4idea.commands.GitHttpAuthenticator
|
||||
import git4idea.config.GitVersion
|
||||
import git4idea.remote.GitRemoteTest.ConfigScope.GLOBAL
|
||||
import git4idea.remote.GitRemoteTest.ConfigScope.SYSTEM
|
||||
import git4idea.test.GitHttpAuthTestService
|
||||
@@ -86,7 +87,14 @@ class GitRemoteTest : GitPlatformTest() {
|
||||
|
||||
assertTrue("Clone didn't complete during the reasonable period of time", cloneWaiter.await(30, TimeUnit.SECONDS))
|
||||
assertFalse("Repository directory shouldn't be created", File(testRoot, projectName).exists())
|
||||
assertErrorNotification("Clone failed", "Authentication failed for '$url/'")
|
||||
|
||||
val expectedAuthFailureMessage = if (vcs.version.isLaterOrEqual(GitVersion(1, 8, 3, 0))) {
|
||||
"Authentication failed for '$url/'"
|
||||
}
|
||||
else {
|
||||
"Authentication failed"
|
||||
}
|
||||
assertErrorNotification("Clone failed", expectedAuthFailureMessage)
|
||||
}
|
||||
|
||||
private fun makeUrl(username: String?) : String {
|
||||
|
||||
Reference in New Issue
Block a user