Class HttpTransporterTest
java.lang.Object
org.eclipse.aether.internal.test.util.http.HttpTransporterTest
Common set of tests against Http transporter.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Authenticationprotected Runnableprotected static SSLContextprotected HttpTransporterFactoryprotected HttpServerprotected static final Pathprotected static final Pathprotected static final longprotected Proxyprotected Fileprotected DefaultRepositorySystemSessionprotected HttpTransporterprotected static final Path -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpTransporterTest(Supplier<HttpTransporterFactory> transporterFactorySupplier) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidafterAll()protected static voidprotected static SSLContextCreates anSSLContextthat extends the default keystore and truststore with the entries fromKEY_STORE_PATH(password"server-pwd") andTRUST_STORE_PATH(password"client-pwd").protected voidprotected RemoteRepositoryprotected voidnewTransporter(String url) protected voidsetUp(org.junit.jupiter.api.TestInfo testInfo) protected static ChecksumExtractorProvides compression algorithms supported by the transporter implementation.protected booleanIndicates whether the transporter implementation supports preemptive authentication (i.e., sending credentials with the first request).protected voidtearDown()protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidtestGet_WithCompression(String encoding) protected voidprotected voidtestPeek()protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected void
-
Field Details
-
KEY_STORE_PATH
-
KEY_STORE_SELF_SIGNED_PATH
-
TRUST_STORE_PATH
-
defaultSslContext
-
session
-
factory
-
transporter
-
closer
-
repoDir
-
httpServer
-
auth
-
proxy
-
OLD_FILE_TIMESTAMP
- See Also:
-
-
Constructor Details
-
HttpTransporterTest
-
-
Method Details
-
beforeAll
- Throws:
NoSuchAlgorithmException
-
afterAll
-
createSSLContext
Creates anSSLContextthat extends the default keystore and truststore with the entries fromKEY_STORE_PATH(password"server-pwd") andTRUST_STORE_PATH(password"client-pwd").- Returns:
- an
SSLContextcombining default and custom key/trust material
-
standardChecksumExtractor
-
newRepo
-
newTransporter
- Throws:
Exception
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
supportsPreemptiveAuth
Indicates whether the transporter implementation supports preemptive authentication (i.e., sending credentials with the first request).- Returns:
trueif preemptive authentication is supported,falseotherwise.
-
testClassify
-
testPeek
- Throws:
Exception
-
testPeek_DoesNotAcceptRfc9457
- Throws:
Exception
-
testRetryHandler_defaultCount_positive
- Throws:
Exception
-
testRetryHandler_defaultCount_negative
- Throws:
Exception
-
testRetryHandler_tooManyRequests_explicitCount_positive
- Throws:
Exception
-
testRetryHandler_tooManyRequests_explicitCount_negative
- Throws:
Exception
-
testRetryHandler_explicitCount_positive
- Throws:
Exception
-
testRetryHandler_disabled
- Throws:
Exception
-
testPeek_NotFound
- Throws:
Exception
-
testPeek_Closed
- Throws:
Exception
-
testPeek_Authenticated
- Throws:
Exception
-
testPeek_Unauthenticated
- Throws:
Exception
-
testPeek_ProxyAuthenticated
- Throws:
Exception
-
testPeek_ProxyUnauthenticated
- Throws:
Exception
-
testPeek_SSL
- Throws:
Exception
-
testPeek_Redirect
- Throws:
Exception
-
testGet_ToMemory
- Throws:
Exception
-
testGet_ToFile
- Throws:
Exception
-
testGet_ToFileTimestamp
- Throws:
Exception
-
testGet_AcceptsRfc9457
- Throws:
Exception
-
testGet_ParseRfc9457
- Throws:
Exception
-
supportedCompressionAlgorithms
Provides compression algorithms supported by the transporter implementation. This should be the string value passed in theAccept-Encodingheader.- Returns:
- stream of supported compression algorithm names
- See Also:
-
testGet_WithCompression
@ParameterizedTest @ValueSource(strings={"br","gzip","zstd"}) protected void testGet_WithCompression(String encoding) throws Exception - Throws:
Exception
-
testGet_EmptyResource
- Throws:
Exception
-
testGet_EncodedResourcePath
- Throws:
Exception
-
testGet_Authenticated
- Throws:
Exception
-
testGet_Unauthenticated
- Throws:
Exception
-
testGet_ProxyAuthenticated
- Throws:
Exception
-
testGet_ProxyUnauthenticated
- Throws:
Exception
-
testGet_RFC9457Response
- Throws:
Exception
-
testGet_RFC9457Response_with_missing_fields
- Throws:
Exception
-
testGet_SSL
- Throws:
Exception
-
testGet_SSL_WithServerErrors
- Throws:
Exception
-
testGet_HTTPS_Unknown_SecurityMode
- Throws:
Exception
-
testGet_HTTPS_Insecure_SecurityMode
- Throws:
Exception
-
testGet_HTTPS_HTTP2Only_Insecure_SecurityMode
- Throws:
Exception
-
enableHttp2Protocol
-
testGet_Redirect
- Throws:
Exception
-
testGet_Resume
- Throws:
Exception
-
testGet_ResumeLocalContentsOutdated
- Throws:
Exception
-
testGet_ResumeRangesNotSupportedByServer
- Throws:
Exception
-
testGet_Checksums_Nexus
- Throws:
Exception
-
testGet_Checksums_XChecksum
- Throws:
Exception
-
testGet_FileHandleLeak
- Throws:
Exception
-
testGet_NotFound
- Throws:
Exception
-
testGet_Closed
- Throws:
Exception
-
testGet_StartCancelled
- Throws:
Exception
-
testGet_ProgressCancelled
- Throws:
Exception
-
testPut_FromMemory
- Throws:
Exception
-
testPut_AcceptsRfc9457
- Throws:
Exception
-
testPut_FromFile
- Throws:
Exception
-
testPut_EmptyResource
- Throws:
Exception
-
testPut_EncodedResourcePath
- Throws:
Exception
-
testPut_Authenticated_ExpectContinue
- Throws:
Exception
-
testPut_Authenticated_ExpectContinueBroken
- Throws:
Exception
-
testPut_Authenticated_ExpectContinueRejected
- Throws:
Exception
-
testPut_Authenticated_ExpectContinueDisabled
- Throws:
Exception
-
testPut_Authenticated_ExpectContinueRejected_ExplicitlyConfiguredHeader
@Test protected void testPut_Authenticated_ExpectContinueRejected_ExplicitlyConfiguredHeader() throws Exception- Throws:
Exception
-
testPut_Unauthenticated
- Throws:
Exception
-
testPut_ProxyAuthenticated
- Throws:
Exception
-
testPut_ProxyUnauthenticated
- Throws:
Exception
-
testPut_SSL
- Throws:
Exception
-
testPut_FileHandleLeak
- Throws:
Exception
-
testPut_Closed
- Throws:
Exception
-
testPut_StartCancelled
- Throws:
Exception
-
testPut_ProgressCancelled
- Throws:
Exception
-
testGetPut_AuthCache
- Throws:
Exception
-
testPut_PreemptiveIsDefault
- Throws:
Exception
-
testPut_AuthCache
- Throws:
Exception
-
testPut_AuthCache_Preemptive
- Throws:
Exception
-
testConcurrency
- Throws:
Exception
-
testConnectTimeout
- Throws:
Exception
-
testRequestTimeout
- Throws:
Exception
-
testUserAgent
- Throws:
Exception
-
testCustomHeaders
- Throws:
Exception
-
testServerAuthScope_NotUsedForProxy
- Throws:
Exception
-
testProxyAuthScope_NotUsedForServer
- Throws:
Exception
-
testAuthSchemeReuse
- Throws:
Exception
-
testAuthSchemePreemptive
- Throws:
Exception
-