public abstract class HttpWagonTestCase extends StreamingWagonTestCase
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpWagonTestCase.HandlerRequestResponse |
static class |
HttpWagonTestCase.PutHandler |
static class |
HttpWagonTestCase.RedirectHandler |
static class |
HttpWagonTestCase.TestSecurityHandler |
| Modifier and Type | Field and Description |
|---|---|
static int |
SC_TOO_MANY_REQUESTS |
artifactDestFile, artifactSourceFile, checksumObserver, destFile, localRepository, localRepositoryPath, logger, mockTransferListener, POM, resource, sourceFile, TEST_CKSUM, TEST_CONTENT, testRepository, testSkipped| Constructor and Description |
|---|
HttpWagonTestCase() |
streamRoundTripTesting, testFailedGetIfNewerToStream, testFailedGetToStream, testStreamingWagon, testWagonGetIfNewerToStreamIsNewer, testWagonGetIfNewerToStreamIsOlder, testWagonGetIfNewerToStreamIsSameassertGetIfNewerTest, assertNotExists, assertOnTransferProgress, assertResourcesAreInRemoteSide, cksum, connectWagon, createDirectory, createFileRepository, createTransferEvent, customizeContext, disconnectWagon, fileRoundTripTesting, getAuthInfo, getExpectedContentLengthOnGet, getFile, getPermissions, getProtocol, getTestRepositoryUrl, getWagon, isSystemCmd, message, putFile, putFile, replaceMockForGet, replayMockForPut, runTest, setUp, setupGetIfNewerTest, setupRepositories, supportsGetIfNewer, testFailedGet, testFailedGetIfNewer, testWagon, testWagonGetFileList, testWagonGetFileListWhenDirectoryDoesNotExist, testWagonGetIfNewerIsNewer, testWagonGetIfNewerIsOlder, testWagonGetIfNewerIsSame, testWagonPutDirectory, testWagonPutDirectoryDeepDestination, testWagonPutDirectoryForDot, testWagonPutDirectoryWhenDirectoryAlreadyExists, testWagonResourceExists, testWagonResourceNotExists, verifyMockcustomizeComponentConfiguration, customizeContainerConfiguration, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setupContainer, tearDownassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toStringpublic static final int SC_TOO_MANY_REQUESTS
public HttpWagonTestCase()
protected int getLocalPort(org.eclipse.jetty.server.Server server)
protected void setupWagonTestingFixtures() throws Exception
setupWagonTestingFixtures in class WagonTestCaseExceptionprotected final int getTestRepositoryPort()
protected org.eclipse.jetty.servlet.ServletContextHandler createContext(org.eclipse.jetty.server.Server server, File repositoryDirectory) throws IOException
IOExceptionprotected void tearDownWagonTestingFixtures() throws Exception
tearDownWagonTestingFixtures in class WagonTestCaseExceptionpublic void testHttpHeaders() throws Exception
Exceptionpublic void testHttpHeadersWithCommonMethods() throws Exception
Exceptionpublic void testUserAgentHeaderIsPresentByDefault() throws Exception
Exceptionpublic void testUserAgentHeaderIsPresentOnlyOnceIfSetMultipleTimes() throws Exception
Exceptionprotected abstract void setHttpConfiguration(StreamingWagon wagon, Properties headers, Properties params)
protected org.eclipse.jetty.server.ServerConnector addConnector(org.eclipse.jetty.server.Server server)
protected String getRepositoryUrl(org.eclipse.jetty.server.Server server)
public void testGetForbidden() throws Exception
Exceptionpublic void testGet404() throws Exception
Exceptionpublic void testGet500() throws Exception
Exceptionpublic void testResourceExistsForbidden() throws Exception
Exceptionpublic void testResourceExists404() throws Exception
Exceptionpublic void testResourceExists500() throws Exception
Exceptionpublic void testResourceExists429() throws Exception
Exceptionprotected long getExpectedLastModifiedOnGet(Repository repository, Resource resource)
getExpectedLastModifiedOnGet in class WagonTestCaseprotected File getRepositoryDirectory()
public void testGzipGet() throws Exception
Exceptionpublic void testProxiedRequest() throws Exception
Exceptionpublic void testProxiedRequestWithAuthentication() throws Exception
Exceptionpublic void testProxiedRequestWithAuthenticationWithProvider() throws Exception
Exceptionpublic void testRedirectGetToStream() throws Exception
Exceptionpublic void testRedirectGet() throws Exception
Exceptionpublic void testRedirectPutFromStreamWithFullUrl() throws Exception
Exceptionprotected void checkRequestResponseForRedirectPutWithFullUrl(HttpWagonTestCase.RedirectHandler redirectHandler, HttpWagonTestCase.PutHandler putHandler)
public void testRedirectPutFromStreamRelativeUrl() throws Exception
Exceptionprotected void checkRequestResponseForRedirectPutWithRelativeUrl(HttpWagonTestCase.RedirectHandler redirectHandler, HttpWagonTestCase.PutHandler putHandler)
protected void checkHandlerResult(List<HttpWagonTestCase.HandlerRequestResponse> handlerRequestResponses, int... expectedResponseCodes)
public void testRedirectPutFileWithFullUrl() throws Exception
Exceptionpublic void testRedirectPutFileRelativeUrl() throws Exception
Exceptionpublic void testRedirectPutFailureNonRepeatableStream() throws Exception
Exceptionpublic void testSecuredGetUnauthorized() throws Exception
Exceptionpublic void testSecuredGetWrongPassword() throws Exception
Exceptionpublic void testSecuredGet() throws Exception
Exceptionpublic void runTestSecuredGet(AuthenticationInfo authInfo) throws Exception
Exceptionpublic void testSecuredGetToStream() throws Exception
Exceptionpublic void runTestSecuredGetToStream(AuthenticationInfo authInfo) throws Exception
Exceptionpublic void testSecuredResourceExistsUnauthorized() throws Exception
Exceptionpublic void testSecuredResourceExistsWrongPassword() throws Exception
Exceptionpublic void testSecuredResourceExists() throws Exception
Exceptionpublic void runTestSecuredResourceExists(AuthenticationInfo authInfo) throws Exception
Exceptionpublic void testPutForbidden() throws Exception
Exceptionpublic void testPut404() throws Exception
Exceptionpublic void testPut500() throws Exception
Exceptionpublic void testPut429() throws Exception
Exceptionpublic void testSecuredPutUnauthorized() throws Exception
Exceptionpublic void testSecuredPutWrongPassword() throws Exception
Exceptionpublic void testSecuredPut() throws Exception
Exceptionpublic void runTestSecuredPut(AuthenticationInfo authInfo) throws Exception
Exceptionpublic void runTestSecuredPut(AuthenticationInfo authInfo, int putNumber) throws Exception
Exceptionpublic void testNonSecuredPutFromStream() throws Exception
Exceptionpublic void testSecuredPutFromStream() throws Exception
Exceptionpublic void runTestSecuredPutFromStream(AuthenticationInfo authInfo, int putNumber, boolean addSecurityHandler) throws Exception
Exceptionprotected abstract boolean supportPreemptiveAuthenticationPut()
protected abstract boolean supportPreemptiveAuthenticationGet()
protected abstract boolean supportProxyPreemptiveAuthentication()
protected void testPreemptiveAuthenticationGet(HttpWagonTestCase.TestSecurityHandler sh, boolean preemptive)
protected void testPreemptiveAuthenticationPut(HttpWagonTestCase.TestSecurityHandler sh, boolean preemptive)
protected void testPreemptiveAuthentication(HttpWagonTestCase.TestSecurityHandler sh, boolean preemptive, int statusCode)
protected HttpWagonTestCase.TestSecurityHandler createSecurityHandler()
protected void verifyWagonExceptionMessage(Exception e, int forStatusCode, String forUrl, String forReasonPhrase)
This implementation represents the most desired assertions, but HttpWagonTestCase sub-classes could override this method if a specific wagon representation makes it impossible to meet these assertions.
e - an instance of WagonExceptionforStatusCode - the response status code that triggered the exceptionforUrl - the url that triggered the exceptionforReasonPhrase - the optional status line reason phrase the server returnedCopyright © 2003–2022 The Apache Software Foundation. All rights reserved.