aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-athenz/src/test
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2020-10-29 09:15:44 +0100
committerMartin Polden <mpolden@mpolden.no>2020-10-29 09:41:39 +0100
commitc0cbed188c1e6cf2bc98e17d23b970b2ede8753c (patch)
tree3efd42d138db1d16a9677d25c94c75ad4556f4e7 /vespa-athenz/src/test
parent94d7e79bcebda73213abdf1b162487a4fa021768 (diff)
Do not implement unexported interface
Diffstat (limited to 'vespa-athenz/src/test')
-rw-r--r--vespa-athenz/src/test/java/com/yahoo/vespa/athenz/aws/AwsCredentialsTest.java (renamed from vespa-athenz/src/test/java/com/yahoo/vespa/athenz/aws/AwsCredentialProviderTest.java)12
1 files changed, 7 insertions, 5 deletions
diff --git a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/aws/AwsCredentialProviderTest.java b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/aws/AwsCredentialsTest.java
index 3569f231814..5467504285b 100644
--- a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/aws/AwsCredentialProviderTest.java
+++ b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/aws/AwsCredentialsTest.java
@@ -9,25 +9,27 @@ import java.time.Clock;
import java.time.Duration;
import java.time.Instant;
+import static org.junit.Assert.assertFalse;
+
/**
* @author tokle
*/
-public class AwsCredentialProviderTest {
+public class AwsCredentialsTest {
@Test
public void refreshes_correctly() {
Clock clock = Clock.systemUTC();
// Does not require refresh when expires in 10 minutes
- Assert.assertFalse(AwsCredentialsProvider.shouldRefresh(getCredentials(clock.instant().plus(Duration.ofMinutes(10)))));
+ assertFalse(AwsCredentials.shouldRefresh(getCredentials(clock.instant().plus(Duration.ofMinutes(10)))));
// Requires refresh when expires in 3 minutes
- Assert.assertTrue(AwsCredentialsProvider.shouldRefresh(getCredentials(clock.instant().plus(Duration.ofMinutes(3)))));
+ Assert.assertTrue(AwsCredentials.shouldRefresh(getCredentials(clock.instant().plus(Duration.ofMinutes(3)))));
// Requires refresh when expired
- Assert.assertTrue(AwsCredentialsProvider.shouldRefresh(getCredentials(clock.instant().minus(Duration.ofMinutes(1)))));
+ Assert.assertTrue(AwsCredentials.shouldRefresh(getCredentials(clock.instant().minus(Duration.ofMinutes(1)))));
// Refreshes when no credentials provided
- Assert.assertTrue(AwsCredentialsProvider.shouldRefresh(null));
+ Assert.assertTrue(AwsCredentials.shouldRefresh(null));
}
private AwsTemporaryCredentials getCredentials(Instant expiration) {