diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2024-11-19 13:57:51 +0000 |
---|---|---|
committer | Gerrit Code Review <support@gerrithub.io> | 2024-11-19 13:57:51 +0000 |
commit | 336ab76c7ffecbb9b5cae61a62b3954e6cc32651 (patch) | |
tree | 19739bbedac636eaad7bc4ee8083fc64dbd0c74f /org.eclipse.jgit.test | |
parent | 76efd28bc91caa914eb4c16656c2928f92400547 (diff) | |
parent | 2454ea81a27e8ea8447b95714ebe724a1eb0c0fd (diff) | |
download | jgit-336ab76c7ffecbb9b5cae61a62b3954e6cc32651.tar.gz jgit-336ab76c7ffecbb9b5cae61a62b3954e6cc32651.zip |
Merge "PullCommandTest: assert git status in some simple tests"
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java index 12300b3390..6d5e45c98f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java @@ -21,6 +21,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; +import java.util.Map; import java.util.concurrent.Callable; import org.eclipse.jgit.api.CreateBranchCommand.SetupUpstreamMode; @@ -29,6 +30,7 @@ import org.eclipse.jgit.api.errors.NoHeadException; import org.eclipse.jgit.junit.JGitTestUtil; import org.eclipse.jgit.junit.RepositoryTestCase; import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.lib.IndexDiff.StageState; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.RefUpdate; import org.eclipse.jgit.lib.Repository; @@ -117,6 +119,7 @@ public class PullCommandTest extends RepositoryTestCase { + db.getWorkTree().getAbsolutePath(); assertEquals(message, mergeCommit.getShortMessage()); } + assertTrue(target.status().call().isClean()); } @Test @@ -153,6 +156,10 @@ public class PullCommandTest extends RepositoryTestCase { assertFileContentsEqual(targetFile, result); assertEquals(RepositoryState.MERGING, target.getRepository() .getRepositoryState()); + Status status = target.status().call(); + Map<String, StageState> conflicting = status.getConflictingStageState(); + assertEquals(1, conflicting.size()); + assertEquals(StageState.BOTH_MODIFIED, conflicting.get("SomeFile.txt")); } @Test |