Skip to content

Commit

Permalink
fix: typo and formatting - exclude test
Browse files Browse the repository at this point in the history
  • Loading branch information
maschnetwork committed Jan 10, 2025
1 parent f0d1f13 commit 1bd2e4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<skipTests>${skipUnitTests}</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import java.util.HashMap;
import java.util.Map;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
Expand All @@ -26,12 +26,6 @@ public class EventBridgeCredentialsProviderFactoryTest {
"aws.eventbridge.region", "us-east-1",
"aws.eventbridge.eventbus.arn", "arn:aws:events:us-east-1:000000000000:event-bus/e2e");

@AfterEach
public final void clearSystemProperties() {
System.clearProperty("aws.configFile");
System.clearProperty("aws.sharedCredentialsFile");
}

@Test
public void shouldUseDefaultAwsCredentialsProvider() {

Expand Down Expand Up @@ -75,13 +69,10 @@ public void shouldUseAwsCredentialsProviderByProvidedClass() {
}

@Test
// Testing wrapper functionality until the AWS SDK issue is solved:
// https://github.com/aws/aws-sdk-java-v2/issues/5635
@Disabled // Todo: Excluded because it is environment specific (Requires no credentials and config
// files present to work). Will keep to verify once AWS SDK issue is fixed:
// https://github.com/aws/aws-sdk-java-v2/issues/5635
public void shouldNotGetSDKClientExceptionWithNull() {
// Set path to non-existing file to force null pointer
System.setProperty("aws.configFile", "/non/existing/file");
System.setProperty("aws.sharedCredentialsFile", "/non/existing/file");

var props = new HashMap<>(commonProps);
var provider =
EventBridgeAwsCredentialsProviderFactory.getAwsCredentialsProvider(
Expand Down

0 comments on commit 1bd2e4f

Please sign in to comment.