From 95d6d98e3db6abbf05a3b4f45c50e9fd27e28ce2 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Wed, 22 Nov 2017 13:44:56 +0300 Subject: [PATCH] git tests: setup default username for auxiliary repositories once again Otherwise Git tries to get a username/email from the OS settings, which sometimes fail on test server agents, and it leads to commit failure. --- plugins/git4idea/tests/git4idea/update/GitSubmoduleTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/git4idea/tests/git4idea/update/GitSubmoduleTest.kt b/plugins/git4idea/tests/git4idea/update/GitSubmoduleTest.kt index 7ddbb75e3342..3fcaf20c7c47 100644 --- a/plugins/git4idea/tests/git4idea/update/GitSubmoduleTest.kt +++ b/plugins/git4idea/tests/git4idea/update/GitSubmoduleTest.kt @@ -154,8 +154,6 @@ class GitSubmoduleTest : GitPlatformTest() { git("submodule add ${FileUtil.toSystemIndependentName(submoduleUrl.path)} ${relativePath ?: ""}") git("commit -m 'Added submodule lib'") git("push origin master") - cd(File(submoduleUrl.path)) - setupDefaultUsername() } /** @@ -165,6 +163,8 @@ class GitSubmoduleTest : GitPlatformTest() { private fun addSubmoduleInProject(submoduleUrl: File, moduleName: String, relativePath: String? = null): GitRepository { addSubmodule(File(projectPath), submoduleUrl, relativePath) val rootPath = "${projectPath}/${relativePath ?: moduleName}" + cd(rootPath) + setupDefaultUsername() return registerRepo(project, rootPath) }