update test environment for JDK 13 builds
This commit is contained in:
parent
ffdc0f6a27
commit
ffea9bfbfe
35
pom.xml
35
pom.xml
@ -122,19 +122,19 @@
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>5.5.1</version>
|
||||
<version>5.5.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-migrationsupport</artifactId>
|
||||
<version>5.5.1</version>
|
||||
<version>5.5.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-junit</artifactId>
|
||||
<version>2.0.0.0</version>
|
||||
<artifactId>hamcrest</artifactId>
|
||||
<version>2.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -146,13 +146,36 @@
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.1.0</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy-agent</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-inline</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- Updated transient dependency from mockito-core for JDK 13 compatibility -->
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
<version>1.9.16</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy-agent</artifactId>
|
||||
<version>1.9.16</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -39,11 +39,9 @@ import static org.apache.commons.io.FileUtils.copyDirectory;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.hamcrest.core.Is.is;
|
||||
import static org.hamcrest.junit.MatcherAssume.assumeThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeFalse;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
import static org.junit.jupiter.api.Assumptions.*;
|
||||
|
||||
/**
|
||||
* JUnit test for HTTP Vault connector.
|
||||
@ -292,7 +290,7 @@ public class HTTPVaultConnectorTest {
|
||||
} catch (VaultConnectorException e) {
|
||||
fail("Written secret could not be read.");
|
||||
}
|
||||
assumeThat(res, is(notNullValue()));
|
||||
assumeTrue(res != null);
|
||||
|
||||
/* Delete secret */
|
||||
try {
|
||||
@ -333,7 +331,7 @@ public class HTTPVaultConnectorTest {
|
||||
} catch (VaultConnectorException e) {
|
||||
fail("Written secret could not be read.");
|
||||
}
|
||||
assumeThat(res, is(notNullValue()));
|
||||
assumeTrue(res != null);
|
||||
|
||||
/* Revoke secret */
|
||||
try {
|
||||
@ -460,7 +458,7 @@ public class HTTPVaultConnectorTest {
|
||||
try {
|
||||
MetadataResponse res = connector.readSecretMetadata(MOUNT_KV2, SECRET2_KEY);
|
||||
maxVersions = res.getMetadata().getMaxVersions();
|
||||
assumeThat("Unexpected maximum number of versions", res.getMetadata().getMaxVersions(), is(10));
|
||||
assumeTrue(res.getMetadata().getMaxVersions() == 10, "Unexpected maximum number of versions");
|
||||
} catch (VaultConnectorException e) {
|
||||
fail("Reading secret metadata failed: " + e.getMessage());
|
||||
}
|
||||
|
@ -29,8 +29,8 @@ import java.util.Map;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.hamcrest.junit.MatcherAssume.assumeThat;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
|
||||
|
||||
/**
|
||||
@ -143,17 +143,17 @@ public class AppRoleSecretTest {
|
||||
|
||||
/* Test fields, that should not be written to JSON */
|
||||
setPrivateField(secret, "accessor", "TEST_ACCESSOR");
|
||||
assumeThat(secret.getAccessor(), is("TEST_ACCESSOR"));
|
||||
assumeTrue("TEST_ACCESSOR".equals(secret.getAccessor()));
|
||||
setPrivateField(secret, "creationTime", "TEST_CREATION");
|
||||
assumeThat(secret.getCreationTime(), is("TEST_CREATION"));
|
||||
assumeTrue("TEST_CREATION".equals(secret.getCreationTime()));
|
||||
setPrivateField(secret, "expirationTime", "TEST_EXPIRATION");
|
||||
assumeThat(secret.getExpirationTime(), is("TEST_EXPIRATION"));
|
||||
assumeTrue("TEST_EXPIRATION".equals(secret.getExpirationTime()));
|
||||
setPrivateField(secret, "lastUpdatedTime", "TEST_UPDATETIME");
|
||||
assumeThat(secret.getLastUpdatedTime(), is("TEST_UPDATETIME"));
|
||||
assumeTrue("TEST_UPDATETIME".equals(secret.getLastUpdatedTime()));
|
||||
setPrivateField(secret, "numUses", 678);
|
||||
assumeThat(secret.getNumUses(), is(678));
|
||||
assumeTrue(secret.getNumUses() == 678);
|
||||
setPrivateField(secret, "ttl", 12345);
|
||||
assumeThat(secret.getTtl(), is(12345));
|
||||
assumeTrue(secret.getTtl() == 12345);
|
||||
try {
|
||||
secretJson = mapper.writeValueAsString(secret);
|
||||
} catch (JsonProcessingException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user