From 695e38a83bafbc5477c326050e39b1b63ea0f5f0 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 21 Jun 2017 15:23:03 -0400 Subject: Add a test for parsing fsck config options and expose FsckMode enum These config options allow overriding the message type (error, warn or ignore) of a specific message ID such as missingEmail. The supported fsck message IDs are defined in ObjectChecker.ErrorType. Since TransferConfig.FsckMode wasn't public parsing fsck configuration options like e.g. fsck.missingEmail=ignore failed with an IllegalAccessException. Fix this by declaring this enum public. Change-Id: I3f41ff7a76a846250a63ce92a9fd111eb347269f Signed-off-by: David Turner Signed-off-by: Matthias Sohn --- org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'org.eclipse.jgit.test/tst') diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java index 8c613ec488..e0c1499030 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java @@ -83,6 +83,11 @@ public class PushCommandTest extends RepositoryTestCase { // create other repository Repository db2 = createWorkRepository(); + final StoredConfig config2 = db2.getConfig(); + + // this tests that this config can be parsed properly + config2.setString("fsck", "", "missingEmail", "ignore"); + config2.save(); // setup the first repository final StoredConfig config = db.getConfig(); -- cgit v1.2.3