summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test/tst
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-08-20 00:15:58 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-08-20 00:16:11 +0200
commit3e2c88199f12c91206f49bd886e2eb033300cd91 (patch)
tree48f5797d9be5d13ea45f65dddfe0205438a09a6e /org.eclipse.jgit.http.test/tst
parentd7ee5aafee7c4eabeea6de8dd125a1ad4ddcdc0f (diff)
parent35d99477b81043f24314c4c84da8f29e601bec19 (diff)
downloadjgit-3e2c88199f12c91206f49bd886e2eb033300cd91.tar.gz
jgit-3e2c88199f12c91206f49bd886e2eb033300cd91.zip
Merge branch 'stable-5.4'
* stable-5.4: Fix NPE in RebaseTodoFile#parseComments Fix NPE in ObjectIdOwnerMap#get Fix NPE in CommitOnlyTest#getHead FileUtils#lastModifiedInstant should not log error if path doesn't exist Cache user global and system-wide git configurations Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock Add missing dependencies for running FS_POSIXTest in Eclipse Fix javadoc for SystemReader#getInstance Upgrade tycho-extras to 1.4.0 Improve retry handling when saving FileStoreAttributes fails Ensure FSTest uses MockSystemReader Make supportsAtomicCreateNewFile return true as default Update orbit to R20190602212107-2019-06 to enable backports from master Handle InvalidPathException in FS_POSIX#createNewFileAtomic Ensure root cause of lock creation failures is logged Implement toString in MockSystemReader and MockConfig LocalDiskRefTreeDatabaseTest shall use MockSystemReader Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReader Ensure we use MockSystemReader in tests Override FileBasedConfig's save method in MockConfig Remove FileBasedConfig.load(boolean) introduced in d45219ba Disable debug log for FS in org.eclipse.jgit.test Bazel: enable logging for tests in org.eclipse.jgit.test LockFile: log exception if creation of lock file failed Stop using deprecated Constants.CHARACTER_ENCODING Change-Id: I709de5edb626536529a99220aae7751b127c9bff Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.http.test/tst')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
index 32fc677fb5..3aac85233f 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
@@ -108,7 +108,6 @@ import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk;
-import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.transport.AbstractAdvertiseRefsHook;
import org.eclipse.jgit.transport.AdvertiseRefsHook;
import org.eclipse.jgit.transport.CredentialItem;
@@ -125,7 +124,6 @@ import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
import org.eclipse.jgit.transport.http.HttpConnectionFactory;
import org.eclipse.jgit.transport.http.JDKHttpConnectionFactory;
import org.eclipse.jgit.transport.http.apache.HttpClientConnectionFactory;
-import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.HttpSupport;
import org.eclipse.jgit.util.SystemReader;
import org.hamcrest.Matchers;
@@ -673,8 +671,8 @@ public class SmartClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_RedirectMax() throws Exception {
- FileBasedConfig userConfig = SystemReader.getInstance()
- .openUserConfig(null, FS.DETECTED);
+ StoredConfig userConfig = SystemReader.getInstance()
+ .getUserConfig();
userConfig.setInt("http", null, "maxRedirects", 4);
userConfig.save();
initialClone_Redirect(4, 302);
@@ -682,8 +680,8 @@ public class SmartClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_RedirectTooOften() throws Exception {
- FileBasedConfig userConfig = SystemReader.getInstance()
- .openUserConfig(null, FS.DETECTED);
+ StoredConfig userConfig = SystemReader.getInstance()
+ .getUserConfig();
userConfig.setInt("http", null, "maxRedirects", 3);
userConfig.save();
@@ -721,8 +719,8 @@ public class SmartClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_RedirectOnPostAllowed() throws Exception {
- FileBasedConfig userConfig = SystemReader.getInstance()
- .openUserConfig(null, FS.DETECTED);
+ StoredConfig userConfig = SystemReader.getInstance()
+ .getUserConfig();
userConfig.setString("http", null, "followRedirects", "true");
userConfig.save();
@@ -782,8 +780,8 @@ public class SmartClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_RedirectForbidden() throws Exception {
- FileBasedConfig userConfig = SystemReader.getInstance()
- .openUserConfig(null, FS.DETECTED);
+ StoredConfig userConfig = SystemReader.getInstance()
+ .getUserConfig();
userConfig.setString("http", null, "followRedirects", "false");
userConfig.save();