aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test/tst
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.http.test/tst')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java8
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java8
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java2
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerSslTest.java12
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java42
5 files changed, 36 insertions, 36 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java
index ab6dc35f79..422be56dd4 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java
@@ -194,13 +194,13 @@ public class DumbClientDumbServerTest extends HttpTestCase {
@Test
public void testInitialClone_Loose() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, remoteURI)) {
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -216,13 +216,13 @@ public class DumbClientDumbServerTest extends HttpTestCase {
new TestRepository<>(remoteRepository).packAndPrune();
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, remoteURI)) {
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java
index 4ff81c5474..5fdc10e73e 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java
@@ -193,14 +193,14 @@ public class DumbClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_Small() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, remoteURI)) {
((TransportHttp) t).setUseSmartHttp(false);
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -218,14 +218,14 @@ public class DumbClientSmartServerTest extends HttpTestCase {
new TestRepository<>(remoteRepository).packAndPrune();
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, remoteURI)) {
((TransportHttp) t).setUseSmartHttp(false);
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java
index 7795658eac..5a5ff1a8ae 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java
@@ -163,7 +163,7 @@ public class HookMessageTest extends HttpTestCase {
.singleton(update));
}
- assertTrue(remoteRepository.hasObject(Q_txt));
+ assertTrue(remoteRepository.getObjectDatabase().has(Q_txt));
assertNotNull("has " + dstName, remoteRepository.exactRef(dstName));
assertEquals(Q, remoteRepository.exactRef(dstName).getObjectId());
fsck(remoteRepository, Q);
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerSslTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerSslTest.java
index 7deb0d85a0..30501dfd5c 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerSslTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerSslTest.java
@@ -275,13 +275,13 @@ public class SmartClientSmartServerSslTest extends HttpTestCase {
@Test
public void testInitialClone_ViaHttps() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, secureURI)) {
t.setCredentialsProvider(testCredentials);
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -292,14 +292,14 @@ public class SmartClientSmartServerSslTest extends HttpTestCase {
@Test
public void testInitialClone_RedirectToHttps() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
URIish cloneFrom = extendPath(remoteURI, "/https");
try (Transport t = Transport.open(dst, cloneFrom)) {
t.setCredentialsProvider(testCredentials);
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -310,7 +310,7 @@ public class SmartClientSmartServerSslTest extends HttpTestCase {
@Test
public void testInitialClone_RedirectBackToHttp() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
URIish cloneFrom = extendPath(secureURI, "/back");
try (Transport t = Transport.open(dst, cloneFrom)) {
@@ -325,7 +325,7 @@ public class SmartClientSmartServerSslTest extends HttpTestCase {
@Test
public void testInitialClone_SslFailure() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, secureURI)) {
// Set a credentials provider that doesn't handle questions
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 b26324d4f2..ecab61eeb5 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
@@ -537,13 +537,13 @@ public class SmartClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_Small() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, remoteURI)) {
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -577,7 +577,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
private void initialClone_Redirect(int nofRedirects, int code)
throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
URIish cloneFrom = redirectURI;
if (code != 301 || nofRedirects > 1) {
@@ -588,7 +588,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -666,7 +666,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
userConfig.setInt("http", null, "maxRedirects", 3);
userConfig.save();
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
URIish cloneFrom = extendPath(redirectURI, "/response/4/302");
String remoteUri = cloneFrom.toString();
@@ -688,7 +688,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_RedirectLoop() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
URIish cloneFrom = extendPath(redirectURI, "/loop");
try (Transport t = Transport.open(dst, cloneFrom)) {
@@ -706,14 +706,14 @@ public class SmartClientSmartServerTest extends HttpTestCase {
userConfig.setString("http", null, "followRedirects", "true");
userConfig.save();
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
URIish cloneFrom = extendPath(remoteURI, "/post");
try (Transport t = Transport.open(dst, cloneFrom)) {
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -751,7 +751,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_RedirectOnPostForbidden() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
URIish cloneFrom = extendPath(remoteURI, "/post");
try (Transport t = Transport.open(dst, cloneFrom)) {
@@ -770,7 +770,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
userConfig.save();
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, redirectURI)) {
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
@@ -784,14 +784,14 @@ public class SmartClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_WithAuthentication() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, authURI)) {
t.setCredentialsProvider(testCredentials);
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -830,7 +830,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
public void testInitialClone_WithAuthenticationNoCredentials()
throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, authURI)) {
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
@@ -852,7 +852,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
public void testInitialClone_WithAuthenticationWrongCredentials()
throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, authURI)) {
t.setCredentialsProvider(new UsernamePasswordCredentialsProvider(
@@ -878,7 +878,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
public void testInitialClone_WithAuthenticationAfterRedirect()
throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
URIish cloneFrom = extendPath(redirectURI, "/target/auth");
CredentialsProvider uriSpecificCredentialsProvider = new UsernamePasswordCredentialsProvider(
@@ -902,7 +902,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -947,14 +947,14 @@ public class SmartClientSmartServerTest extends HttpTestCase {
public void testInitialClone_WithAuthenticationOnPostOnly()
throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, authOnPostURI)) {
t.setCredentialsProvider(testCredentials);
t.fetch(NullProgressMonitor.INSTANCE, mirror(master));
}
- assertTrue(dst.hasObject(A_txt));
+ assertTrue(dst.getObjectDatabase().has(A_txt));
assertEquals(B, dst.exactRef(master).getObjectId());
fsck(dst, B);
@@ -1124,7 +1124,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
@Test
public void testInitialClone_BrokenServer() throws Exception {
Repository dst = createBareRepository();
- assertFalse(dst.hasObject(A_txt));
+ assertFalse(dst.getObjectDatabase().has(A_txt));
try (Transport t = Transport.open(dst, brokenURI)) {
try {
@@ -1283,7 +1283,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
t.push(NullProgressMonitor.INSTANCE, Collections.singleton(u));
}
- assertTrue(remoteRepository.hasObject(Q_txt));
+ assertTrue(remoteRepository.getObjectDatabase().has(Q_txt));
assertNotNull("has " + dstName, remoteRepository.exactRef(dstName));
assertEquals(Q, remoteRepository.exactRef(dstName).getObjectId());
fsck(remoteRepository, Q);
@@ -1357,7 +1357,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
t.push(NullProgressMonitor.INSTANCE, Collections.singleton(u));
}
- assertTrue(remoteRepository.hasObject(Q_bin));
+ assertTrue(remoteRepository.getObjectDatabase().has(Q_bin));
assertNotNull("has " + dstName, remoteRepository.exactRef(dstName));
assertEquals(Q, remoteRepository.exactRef(dstName).getObjectId());
fsck(remoteRepository, Q);