use of com.thoughtworks.go.domain.materials.TestSubprocessExecutionContext in project gocd by gocd.
the class GitTestRepo method addFileAndAmend.
public List<Modification> addFileAndAmend(String fileName, String message) throws IOException {
File newFile = new File(gitRepo, fileName);
newFile.createNewFile();
new GitCommand(null, gitRepo, GitMaterialConfig.DEFAULT_BRANCH, false, null).add(newFile);
new GitCommandWithAmend(null, gitRepo, GitMaterialConfig.DEFAULT_BRANCH, false, new HashMap<>()).commitWithAmend(message, gitRepo);
return createMaterial().latestModification(createRandomTempDirectory().toFile(), new TestSubprocessExecutionContext());
}
Aggregations