use of com.google.copybara.Origin.Baseline in project copybara by google.
the class GitDestinationTest method testDestinationReader.
@Test
public void testDestinationReader() throws Exception {
fetch = primaryBranch;
push = primaryBranch;
Path file = workdir.resolve("test.txt");
Files.write(file, "some content".getBytes(UTF_8));
Writer<GitRevision> writer = firstCommitWriter();
process(writer, new DummyRevision("first_commit"));
assertThat(writer.getDestinationReader(console, new Baseline<>(repo().resolveReference("HEAD").getSha1(), null), workdir).readFile("test.txt")).contains("some content");
}
Aggregations