public class InstanceProfileCredentialsProviderIntegrationTest extends LogCaptor.LogCaptorTestBase
LogCaptor.DefaultLogCaptor, LogCaptor.LogCaptorTestBase
Constructor and Description |
---|
InstanceProfileCredentialsProviderIntegrationTest(boolean tokenEnabled) |
Modifier and Type | Method and Description |
---|---|
void |
canBeConfiguredToOnlyRefreshCredentialsAfterFirstCallToGetCredentials() |
void |
getCredentials_failsIfImdsFailsOnFirstCall() |
void |
getCredentials_onlyCallsImdsOnceEvenWithExpiredCredentials() |
void |
getCredentialsDisabled_shouldGetCredentialsAfterEnabled() |
void |
getInstance_ReturnsSameInstance() |
void |
refreshCredentialFailureUsesCachedCredentials() |
void |
refreshWithAsyncCredentialFailureUsesCachedCredentials() |
void |
setUp()
Starts up the mock EC2 Instance Metadata Service.
|
void |
tearDown()
Shuts down the mock EC2 Instance Metadata Service.
|
void |
testMultipleThreadsLoadingAndRefreshingCredentials()
Tests by initiating a refresh thread in parallel which refreshes the
credentials.
|
void |
testNoInstanceProfiles()
Tests that we correctly handle when no instance profiles are available
through the metadata service.
|
void |
testSessionCredentials_Expired()
Tests that we correctly handle when the metadata service credentials have
expired.
|
void |
testSessionCredentials_MultipleInstanceProfiles()
Tests that we correctly handle the metadata service returning credentials
when multiple instance profiles are available.
|
void |
testSessionCredentials()
Tests that we correctly handle the metadata service returning credentials.
|
static Iterable<Boolean[]> |
tokenEnabled() |
setupLogging, stopLogging
append, clear, close, finalize, loggedEvents, requiresLayout
public InstanceProfileCredentialsProviderIntegrationTest(boolean tokenEnabled)
public void setUp() throws Exception
Exception
public void tearDown() throws Exception
Exception
public void getInstance_ReturnsSameInstance()
public void testSessionCredentials() throws Exception
Exception
public void testSessionCredentials_MultipleInstanceProfiles() throws Exception
Exception
public void testNoInstanceProfiles() throws Exception
Exception
public void getCredentialsDisabled_shouldGetCredentialsAfterEnabled() throws Exception
Exception
public void testSessionCredentials_Expired() throws Exception
Exception
public void testMultipleThreadsLoadingAndRefreshingCredentials() throws Exception
Exception
public void canBeConfiguredToOnlyRefreshCredentialsAfterFirstCallToGetCredentials() throws InterruptedException
InterruptedException
public void refreshCredentialFailureUsesCachedCredentials() throws IOException
IOException
public void refreshWithAsyncCredentialFailureUsesCachedCredentials() throws IOException
IOException
public void getCredentials_onlyCallsImdsOnceEvenWithExpiredCredentials()
public void getCredentials_failsIfImdsFailsOnFirstCall()
Copyright © 2022. All rights reserved.