Search in sources :

Example 16 with TransformResult

use of com.google.copybara.TransformResult in project copybara by google.

the class HgDestinationTest method testEmptyChange.

@Test
public void testEmptyChange() throws Exception {
    remoteRepo.archive(workdir.toString());
    DummyRevision originRef = new DummyRevision("origin_ref");
    TransformResult result = TransformResults.of(workdir, originRef);
    RepoException expected = assertThrows(RepoException.class, () -> writer.write(result, destinationFiles, console));
    assertThat(expected.getMessage()).contains("Error executing hg");
}
Also used : TransformResult(com.google.copybara.TransformResult) DummyRevision(com.google.copybara.testing.DummyRevision) RepoException(com.google.copybara.exception.RepoException) Test(org.junit.Test)

Aggregations

TransformResult (com.google.copybara.TransformResult)16 DummyRevision (com.google.copybara.testing.DummyRevision)11 DestinationEffect (com.google.copybara.DestinationEffect)10 Test (org.junit.Test)8 Author (com.google.copybara.authoring.Author)5 Change (com.google.copybara.Change)4 Changes (com.google.copybara.Changes)4 WriterContext (com.google.copybara.WriterContext)4 ImmutableList (com.google.common.collect.ImmutableList)2 ChangeMessage (com.google.copybara.ChangeMessage)2 WriterImpl (com.google.copybara.git.GitDestination.WriterImpl)2 CreatePullRequest (com.google.copybara.git.github.api.CreatePullRequest)2 PullRequest (com.google.copybara.git.github.api.PullRequest)2 HgLogEntry (com.google.copybara.hg.HgRepository.HgLogEntry)2 Console (com.google.copybara.util.console.Console)2 CheckerException (com.google.copybara.checks.CheckerException)1 EmptyChangeException (com.google.copybara.exception.EmptyChangeException)1 RepoException (com.google.copybara.exception.RepoException)1 GitHubApi (com.google.copybara.git.github.api.GitHubApi)1 GithubApi (com.google.copybara.git.github.api.GithubApi)1