use of com.thoughtworks.go.domain.materials.RevisionContext in project gocd by gocd.
the class P4MaterialUpdaterTestBase method shouldSupportCustomDestinations.
@Test
public void shouldSupportCustomDestinations() throws Exception {
P4Material material = p4Fixture.material(VIEW);
material.setFolder("dest");
updateTo(material, new RevisionContext(REVISION_2), JobResult.Passed);
assertThat(workingDir.listFiles().length, is(1));
assertThat(new File(workingDir, "dest").listFiles().length, is(7));
}
use of com.thoughtworks.go.domain.materials.RevisionContext in project gocd by gocd.
the class P4MaterialUpdaterTicketTest method shouldNotDisplayPassword.
@Test
public void shouldNotDisplayPassword() throws Exception {
P4Material material = p4Fixture.material(VIEW);
material.setPassword("wubba lubba dub dub");
updateTo(material, new RevisionContext(REVISION_2), JobResult.Failed);
assertThat(console.output(), not(containsString("wubba lubba dub dub")));
}
use of com.thoughtworks.go.domain.materials.RevisionContext in project gocd by gocd.
the class SvnMaterialUpdaterTest method shouldDoAFreshCheckoutIfDestIsNotARepo.
@Test
public void shouldDoAFreshCheckoutIfDestIsNotARepo() throws Exception {
updateTo(svnMaterial, new RevisionContext(revision), JobResult.Passed);
console.clear();
FileUtils.deleteQuietly(new File(workingDir, "svnDir/.svn"));
updateTo(svnMaterial, new RevisionContext(revision), JobResult.Passed);
assertThat(console.output(), containsString("Checked out revision"));
assertThat(console.output(), not(containsString("Updating")));
}
use of com.thoughtworks.go.domain.materials.RevisionContext in project gocd by gocd.
the class SvnMaterialUpdaterTest method shouldUpdateToDestinationFolder.
@Test
public void shouldUpdateToDestinationFolder() throws Exception {
svnMaterial.setFolder("dest");
updateTo(svnMaterial, new RevisionContext(revision), JobResult.Passed);
assertThat(new File(workingDir, "dest").exists(), is(true));
assertThat(new File(workingDir, "dest/.svn").exists(), is(true));
}
use of com.thoughtworks.go.domain.materials.RevisionContext in project gocd by gocd.
the class SvnMaterialUpdaterTest method shouldNotLeakPasswordInUrlIfCheckoutFails.
@Test
public void shouldNotLeakPasswordInUrlIfCheckoutFails() throws Exception {
SvnMaterial material = MaterialsMother.svnMaterial("https://foo:foopassword@thisdoesnotexist.io/repo");
updateTo(material, new RevisionContext(revision), JobResult.Failed);
assertThat(console.output(), containsString("https://foo:******@thisdoesnotexist.io/repo"));
assertThat(console.output(), not(containsString("foopassword")));
}
Aggregations