public abstract class HttpTestCase extends LocalDiskRepositoryTestCase
| Modifier and Type | Field and Description |
|---|---|
protected static String |
master
Constant
master="Constants.R_HEADS + Constants.MASTER" |
protected AppServer |
server
In-memory application server; subclass must start.
|
ASSUME_UNCHANGED, author, committer, CONTENT, CONTENT_ID, LENGTH, mockSystemReader, MOD_TIME, SMUDGE| Constructor and Description |
|---|
HttpTestCase() |
| Modifier and Type | Method and Description |
|---|---|
protected AppServer |
createServer()
Create the
AppServer.This default implementation creates a server
without SSLsupport listening for HTTP connections on a dynamically chosen
port, which can be gotten once the server has been started via its
AppServer.getPort() method. |
protected TestRepository<Repository> |
createTestRepository()
Create TestRepository
|
protected static URIish |
extendPath(URIish uri,
String pathComponents)
Extend a path
|
protected static void |
fsck(Repository db,
RevObject... tips)
Run fsck
|
protected List<AccessEvent> |
getRequests()
Get requests.
|
protected List<AccessEvent> |
getRequests(String path)
Get requests.
|
protected List<AccessEvent> |
getRequests(URIish base,
String path)
Get requests.
|
static String |
join(URIish base,
String path)
Join a base URIish and a path
|
static String |
loose(URIish base,
AnyObjectId id)
Create loose object path
|
protected static Set<RefSpec> |
mirror(String... refs)
Mirror refs
|
protected static Collection<RemoteRefUpdate> |
push(TestRepository from,
RevCommit q)
Push a commit
|
protected static String |
rewriteUrl(String url,
String newProtocol,
int newPort)
Rewrite a url
|
void |
setUp() |
void |
tearDown() |
protected URIish |
toURIish(org.eclipse.jetty.servlet.ServletContextHandler app,
String name)
Convert a path relative to the app's context path to a URIish
|
protected URIish |
toURIish(String path)
Convert path to URIish
|
addRepoToClose, createBareRepository, createRepository, createRepository, createTempDirectory, createTempFile, createUniqueTestGitDir, createWorkRepository, getCeilings, getTemporaryDirectory, indexState, read, recursiveDelete, runHook, tick, write, writeprotected static final String master
master="Constants.R_HEADS + Constants.MASTER"protected AppServer server
public void setUp()
throws Exception
setUp in class LocalDiskRepositoryTestCaseExceptionpublic void tearDown()
throws Exception
tearDown in class LocalDiskRepositoryTestCaseExceptionprotected AppServer createServer()
AppServer.This default implementation creates a server
without SSLsupport listening for HTTP connections on a dynamically chosen
port, which can be gotten once the server has been started via its
AppServer.getPort() method.
Subclasses may override if they need a more specialized server.AppServer.protected TestRepository<Repository> createTestRepository() throws IOException
IOExceptionprotected URIish toURIish(String path) throws URISyntaxException
path - URISyntaxExceptionprotected URIish toURIish(org.eclipse.jetty.servlet.ServletContextHandler app, String name) throws URISyntaxException
app - name - URISyntaxExceptionprotected List<AccessEvent> getRequests()
protected List<AccessEvent> getRequests(URIish base, String path)
base - path - protected List<AccessEvent> getRequests(String path)
path - protected static void fsck(Repository db, RevObject... tips) throws Exception
db - tips - Exceptionprotected static Set<RefSpec> mirror(String... refs)
refs - protected static Collection<RemoteRefUpdate> push(TestRepository from, RevCommit q) throws IOException
from - q - IOExceptionpublic static String loose(URIish base, AnyObjectId id)
base - id - public static String join(URIish base, String path)
base - path - a relative pathprotected static String rewriteUrl(String url, String newProtocol, int newPort)
url - newProtocol - newPort - protected static URIish extendPath(URIish uri, String pathComponents) throws URISyntaxException
uri - pathComponents - URISyntaxExceptionCopyright © 2019 Eclipse JGit Project. All rights reserved.