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.
This commit is contained in:
Kirill Likhodedov
2017-11-22 13:45:49 +03:00
parent 3fe0ce4a99
commit 95d6d98e3d
@@ -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)
}