summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit.http/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix non-parameterized generic type warningMatthias Sohn2016-08-081-1/+3
| | | | Change-Id: Ib857166f64420aebf7c31d72825cac44bd770dbd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix AppServer build errors in Eclipse with <4.6 target platformsMatthias Sohn2016-07-141-18/+27
| | | | | | | | | | | | 9aa3748 added dummy implementations for loadRoleInfo() and loadUserInfo() to class MappedLoginService to fix compile errors in Eclipse when using 4.6 target platform which brings Jetty 9.3 adding these two methods. Unfortunately this causes errors when using non 4.6 target platform coming with an older Jetty version. Fix this by extracting the anonymous subclass of MappedLoginService which allows to suppress the unused private method errors in Eclipse. Change-Id: I75baeea7ff4502ce9ef2b541b3c0555da5535d79 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Implement new abstract MappedLoginService methods added in Jetty 9.3Matthias Sohn2016-07-111-0/+8
| | | | | | | | Eclipse Neon comes with Jetty 9.3 which is causing unimplemented abstract method errors in test class AppServer when using the JGit or EGit Neon target platform. Fix this by adding dummy implementations. Change-Id: Ie49107d814a846997de95f149e91fe1ec2fbe4d8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-4.2'Matthias Sohn2016-02-151-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: Don't use deprecated LockFile constructor Fix warnings about unchecked conversion of MergeResult MockServletConfig: Fix warning about unchecked conversion of Enumeration HugeFileTest: Make Git a class member and open in try-with-resource Suppress "unchecked cast" warnings related to UploadPackFactory.DISABLED DiffAlgorithms: Fix warnings about variable hiding DirCacheBasicTest: Open ObjectInserter.Formatter in try-with-resource DirCacheBuilderIteratorTest: Open TreeWalk in try-with-resource DirCacheCGitCompatabilityTest: Open TreeWalk in try-with-resource DirCacheCheckoutMaliciousPathTest: Open Git and RevWalk in t-w-r DirCacheIteratorTest: Open TreeWalk instances in try-with-resource ForPathTest: Open TreeWalk in try-with-resource GitConstructionTest: Open Git instance in try-with-resource IndexDiffTest: Open Git instances in try-with-resources ManifestParserTest: Don't use deprecated StringBufferInputStream InMemoryRepository: Remove unused RevWalk from batch method signature IndexModificationTimesTest: Open Git instances in try-with-resource InterIndexDiffFilterTest: Open TreeWalk in try-with-resource LockFileTest: Open Git instance in try-with-resource JGit v4.1.2.201602141800-r MergeCommandTest: Use JUnit's assume to check preconditions MergeCommandTest: Open Git instances in try-with-resource Change-Id: Ie5dba6b9132a29e86958a04fa2b76465bcd2c6b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * MockServletConfig: Fix warning about unchecked conversion of EnumerationDavid Pursehouse2016-02-151-1/+1
| | | | | | | | | | Change-Id: Ic5ce6d220e3b644032819ce4b2f31c669be1cdb9 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
* | Support LFS protocol and a file system based LFS storageMatthias Sohn2016-02-041-1/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement LfsProtocolServlet handling the "Git LFS v1 Batch API" protocol [1]. Add a simple file system based LFS content store and the debug-lfs-store command to simplify testing. Introduce a LargeFileRepository interface to enable additional storage implementation while reusing the same protocol implementation. At the client side we have to configure the lfs.url, specify that we use the batch API and we don't use authentication: [lfs] url = http://host:port/lfs batch = true [lfs "http://host:port/lfs"] access = none the git-lfs client appends the "objects/batch" to the lfs.url. Hard code an Authorization header in the FileLfsRepository.getAction because then git-lfs client will skip asking for credentials. It will just forward the Authorization header from the response to the download/upload request. The FileLfsServlet supports file content storage for "Large File Storage" (LFS) server as defined by the Github LFS API [2]. - upload and download of large files is probably network bound hence use an asynchronous servlet for good scalability - simple object storage in file system with 2 level fan-out - use LockFile to protect writing large objects against multiple concurrent uploads of the same object - to prevent corrupt uploads the uploaded file is rejected if its hash doesn't match id given in URL The debug-lfs-store command is used to run the LfsProtocolServlet and, optionally, the FileLfsServlet which makes it easier to setup a local test server. [1] https://github.com/github/git-lfs/blob/master/docs/api/http-v1-batch.md [2] https://github.com/github/git-lfs/tree/master/docs/api Bug: 472961 Change-Id: I7378da5575159d2195138d799704880c5c82d5f3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* Update to Jetty 9.2.10Matthias Sohn2015-05-103-7/+20
| | | | Change-Id: Iace29e6e99836019bb603ce06a08b91bada7c627 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove some unnecessary dependencies on FileRepostoryRobin Rosenberg2013-04-181-3/+2
| | | | | Change-Id: Ib6ee3a2874a7e2240aa68f4ac32d00c4d1fab5ae Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* SimpleHttpServer API shouldn't expose internalsMatthias Sohn2013-03-221-4/+3
| | | | Change-Id: I5963ae720f33cb148de08b4c64d02c81d6791139 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit 3.0: move internal classes into an internal subpackageShawn Pearce2013-03-182-2/+2
| | | | | | | | This breaks all existing callers once. Applications are not supposed to build against the internal storage API unless they can accept API churn and make necessary updates as versions change. Change-Id: I2ab1327c202ef2003565e1b0770a583970e432e9
* cleanup: Remove unused declarationsRobin Rosenberg2012-06-061-1/+0
| | | | Change-Id: I3b54cb9f73cb433c71a441a11ddc74cfecdaa1dc
* Revert Jetty from 8.1.3.v20120416 to 7.6.0.v20120127Matthias Sohn2012-06-031-1/+1
| | | | | | | | | | | This reverts commit 24a0f47e32ab7cdf20c2201d7100599ea057f8a3 and updates JGit dependencies to use the latest available Jetty 7.x release. We can't use Jetty 8.x since it depends on Servlet API 3.0 which requires Java 6 but JGit still wants to support Java 5. Use one of the target platforms defined in Ibf67a6d3539fa0708a3e5dbe44fb899c56fbd8ed to work with that in Eclipse. Change-Id: I343273d994dc7b6e0287c604e5926ff77d5b585b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use default thread pool to prevent thread pool starvationMatthias Sohn2012-06-031-17/+1
| | | | | | | Bug: 380302 Change-Id: Ie66d495481776469ff2aa603c550557cff82cafc Suggested-By: Joakim Erdfelt <joakim@intalio.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update Jetty to 8.1.3.v20120416Matthias Sohn2012-05-232-3/+3
| | | | | | | | Jetty 8.1.3 comes with Juno M7 and this version can be installed from http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/8.1.3.v20120416/ Change-Id: Ifc4bfbb3efbab0f5bfbde74f0b2ddc5a2f9ee6a5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* cleanup: Silence an unused-parameter warningRobin Rosenberg2012-03-091-0/+1
| | | | Change-Id: Ic0ee9c08642d4efc6ef1f2333ebe6614e9c2df87
* Adapt to Jetty 7.3 API change coming with IndigoMatthias Sohn2011-03-011-0/+4
| | | | | | | Indigo comes with Jetty 7.3 bringing some API changes. This still works with Jetty 7.1.6 shipped with Helios. Change-Id: If4f9d6ef6b45c94f8bb097f8b02c10317b47547b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* daemon: Use HTTP's resolver and factory patternShawn O. Pearce2011-02-141-3/+3
| | | | | | | | | | | | | | | | | | | Using a resolver and factory pattern for the anonymous git:// Daemon class makes transport.Daemon more useful on non-file storage systems, or in embedded applications where the caller wants more precise control over the work tasks constructed within the daemon. Rather than defining new interfaces, move the existing HTTP ones into transport.resolver and make them generic on the connection handle type. For HTTP, continue to use HttpServletRequest, and for transport.Daemon use DaemonClient. To remain compatible with transport.Daemon, FileResolver needs to learn how to use multiple base directories, and how to export any Repository instance at a fixed name. Change-Id: I1efa6b2bd7c6567e983fbbf346947238ea2e847e Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Convert all JGit unit tests to JUnit 4Robin Rosenberg2010-12-313-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Eclipse has some problem re-running single JUnit tests if the tests are in Junit 3 format, but the JUnit 4 launcher is used. This was quite unnecessary and the move was not completed. We still have no JUnit4 test. This completes the extermination of JUnit3. Most of the work was global searce/replace using regular expression, followed by numerous invocarions of quick-fix and organize imports and verification that we had the same number of tests before and after. - Annotations were introduced. - All references to JUnit3 classes removed - Half-good replacement for getting the test name. This was needed to make the TestRngs work. The initialization of TestRngs was also made lazily since we can not longer find out the test name in runtime in the @Before methods. - Renamed test classes to end with Test, with the exception of TestTranslateBundle, which fails from Maven - Moved JGitTestUtil to the junit support bundle Change-Id: Iddcd3da6ca927a7be773a9c63ebf8bb2147e2d13 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Introduce http test bundleJens Baumgart2010-12-087-0/+1171
Introduce a http test bundle to make this functionality available for EGit tests. A simple http server class is provided. The jetty version was updated to a version that is also available via p2 (needed in EGit UI tests). Change-Id: I13bfc4c6c47e27d8f97d3e9752347d6d23e553d4 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>