Search in sources :

Example 1 with AuthSettingsImpl

use of jetbrains.buildServer.buildTriggers.vcs.git.AuthSettingsImpl 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()));
}
Also used : AuthSettingsImpl(jetbrains.buildServer.buildTriggers.vcs.git.AuthSettingsImpl) GeneralCommandLine(com.intellij.execution.configurations.GeneralCommandLine) VcsRoot(jetbrains.buildServer.vcs.VcsRoot) URIishHelperImpl(jetbrains.buildServer.buildTriggers.vcs.git.agent.URIishHelperImpl) ExecResult(jetbrains.buildServer.ExecResult) Test(org.testng.annotations.Test) TestFor(jetbrains.buildServer.util.TestFor)

Aggregations

GeneralCommandLine (com.intellij.execution.configurations.GeneralCommandLine)1 ExecResult (jetbrains.buildServer.ExecResult)1 AuthSettingsImpl (jetbrains.buildServer.buildTriggers.vcs.git.AuthSettingsImpl)1 URIishHelperImpl (jetbrains.buildServer.buildTriggers.vcs.git.agent.URIishHelperImpl)1 TestFor (jetbrains.buildServer.util.TestFor)1 VcsRoot (jetbrains.buildServer.vcs.VcsRoot)1 Test (org.testng.annotations.Test)1