use of jetbrains.buildServer.buildTriggers.vcs.git.agent.URIishHelperImpl in project teamcity-git by JetBrains.
the class ScriptGenTest method check_escaping.
@TestFor(issues = "TW-40688")
@Test(dataProvider = "passwords")
public void check_escaping(@NotNull String password) throws Exception {
VcsRoot root = createRootWithPassword(password);
GeneralCommandLine cmd = new GeneralCommandLine();
cmd.setExePath(createGenerator().generateAskPass(new AuthSettingsImpl(root, new URIishHelperImpl())).getCanonicalPath());
ExecResult result = SimpleCommandLineProcessRunner.runCommand(cmd, null);
assertEquals(password, trimNewLines(result.getStdout()));
}
use of jetbrains.buildServer.buildTriggers.vcs.git.agent.URIishHelperImpl in project teamcity-git by JetBrains.
the class HttpUrlWithUsernameTest method getMirrorConfig.
@NotNull
private StoredConfig getMirrorConfig(@NotNull VcsRootImpl root) throws IOException, VcsException {
GitVcsRoot gitRoot = new GitVcsRoot(myMirrorManager, root, new URIishHelperImpl());
File mirrorDir = myMirrorManager.getMirrorDir(gitRoot.getRepositoryFetchURL().toString());
Repository r = new RepositoryBuilder().setGitDir(mirrorDir).build();
return r.getConfig();
}
Aggregations