diff options
Diffstat (limited to 'org.eclipse.jgit.http.test')
7 files changed, 65 insertions, 65 deletions
diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index 5330327c8c..15e9ac4f1c 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Automatic-Module-Name: org.eclipse.jgit.http.test Bundle-SymbolicName: org.eclipse.jgit.http.test -Bundle-Version: 5.2.2.qualifier +Bundle-Version: 5.3.0.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 @@ -28,25 +28,25 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)", org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)", - org.eclipse.jgit.errors;version="[5.2.2,5.3.0)", - org.eclipse.jgit.http.server;version="[5.2.2,5.3.0)", - org.eclipse.jgit.http.server.glue;version="[5.2.2,5.3.0)", - org.eclipse.jgit.http.server.resolver;version="[5.2.2,5.3.0)", - org.eclipse.jgit.internal;version="[5.2.2,5.3.0)", - org.eclipse.jgit.internal.storage.dfs;version="[5.2.2,5.3.0)", - org.eclipse.jgit.internal.storage.file;version="[5.2.2,5.3.0)", - org.eclipse.jgit.internal.storage.reftable;version="[5.2.2,5.3.0)", - org.eclipse.jgit.junit;version="[5.2.2,5.3.0)", - org.eclipse.jgit.junit.http;version="[5.2.2,5.3.0)", - org.eclipse.jgit.lib;version="[5.2.2,5.3.0)", - org.eclipse.jgit.nls;version="[5.2.2,5.3.0)", - org.eclipse.jgit.revwalk;version="[5.2.2,5.3.0)", - org.eclipse.jgit.storage.file;version="[5.2.2,5.3.0)", - org.eclipse.jgit.transport;version="[5.2.2,5.3.0)", - org.eclipse.jgit.transport.http;version="[5.2.2,5.3.0)", - org.eclipse.jgit.transport.http.apache;version="[5.2.2,5.3.0)", - org.eclipse.jgit.transport.resolver;version="[5.2.2,5.3.0)", - org.eclipse.jgit.util;version="[5.2.2,5.3.0)", + org.eclipse.jgit.errors;version="[5.3.0,5.4.0)", + org.eclipse.jgit.http.server;version="[5.3.0,5.4.0)", + org.eclipse.jgit.http.server.glue;version="[5.3.0,5.4.0)", + org.eclipse.jgit.http.server.resolver;version="[5.3.0,5.4.0)", + org.eclipse.jgit.internal;version="[5.3.0,5.4.0)", + org.eclipse.jgit.internal.storage.dfs;version="[5.3.0,5.4.0)", + org.eclipse.jgit.internal.storage.file;version="[5.3.0,5.4.0)", + org.eclipse.jgit.internal.storage.reftable;version="[5.3.0,5.4.0)", + org.eclipse.jgit.junit;version="[5.3.0,5.4.0)", + org.eclipse.jgit.junit.http;version="[5.3.0,5.4.0)", + org.eclipse.jgit.lib;version="[5.3.0,5.4.0)", + org.eclipse.jgit.nls;version="[5.3.0,5.4.0)", + org.eclipse.jgit.revwalk;version="[5.3.0,5.4.0)", + org.eclipse.jgit.storage.file;version="[5.3.0,5.4.0)", + org.eclipse.jgit.transport;version="[5.3.0,5.4.0)", + org.eclipse.jgit.transport.http;version="[5.3.0,5.4.0)", + org.eclipse.jgit.transport.http.apache;version="[5.3.0,5.4.0)", + org.eclipse.jgit.transport.resolver;version="[5.3.0,5.4.0)", + org.eclipse.jgit.util;version="[5.3.0,5.4.0)", org.hamcrest;version="[1.1.0,2.0.0)", org.hamcrest.core;version="[1.1.0,2.0.0)", org.junit;version="[4.12,5.0.0)", diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index ba17601124..9eb8e7c835 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -51,7 +51,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.2.2-SNAPSHOT</version> + <version>5.3.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.test</artifactId> @@ -71,13 +71,6 @@ </dependency> <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - <scope>test</scope> - <version>[1.1.0,2.0.0)</version> - </dependency> - - <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit</artifactId> <version>${project.version}</version> @@ -91,6 +84,13 @@ </dependency> <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-library</artifactId> + <scope>test</scope> + <version>[1.1.0,2.0.0)</version> + </dependency> + + <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.junit.http</artifactId> <version>${project.version}</version> @@ -139,7 +139,7 @@ <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> - <argLine>-Djava.io.tmpdir=${project.build.directory} -Xmx300m</argLine> + <argLine>@{argLine} -Djava.io.tmpdir=${project.build.directory} -Xmx300m</argLine> <includes> <include>**/*Test.java</include> <include>**/*Tests.java</include> 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); |