Upgrade TravisCI to use Java 12.

Original pull request: #454.
This commit is contained in:
Mark Paluch
2019-08-01 09:15:47 +02:00
parent bac829229d
commit 05686165b3
3 changed files with 26 additions and 24 deletions

View File

@@ -1 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip

View File

@@ -1,7 +1,7 @@
language: java
jdk:
- oraclejdk8
- openjdk12
sudo: required

View File

@@ -35,8 +35,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Mark Paluch
* @author Christophe Tafani-Dereeper
*/
public class AppRoleAuthenticationStepsIntegrationTests extends
AppRoleAuthenticationIntegrationTestBase {
public class AppRoleAuthenticationStepsIntegrationTests
extends AppRoleAuthenticationIntegrationTestBase {
@Test
public void authenticationStepsShouldAuthenticateWithWrappedSecretId() {
@@ -48,8 +48,8 @@ public class AppRoleAuthenticationStepsIntegrationTests extends
.secretId(SecretId.wrapped(unwrappingToken)).roleId(roleId).build();
AuthenticationStepsExecutor executor = new AuthenticationStepsExecutor(
AppRoleAuthentication.createAuthenticationSteps(options), prepare()
.getRestTemplate());
AppRoleAuthentication.createAuthenticationSteps(options),
prepare().getRestTemplate());
assertThat(executor.login()).isNotNull();
}
@@ -59,17 +59,18 @@ public class AppRoleAuthenticationStepsIntegrationTests extends
String secretId = (String) getVaultOperations()
.write(String.format("auth/approle/role/%s/secret-id", "with-secret-id"),
null).getData().get("secret_id");
null)
.getData().get("secret_id");
VaultToken roleIdToken = generateWrappedRoleIdResponse();
AppRoleAuthenticationOptions options = AppRoleAuthenticationOptions.builder()
.secretId(SecretId.provided(secretId))
.roleId(RoleId.wrapped(roleIdToken)).build();
.secretId(SecretId.provided(secretId)).roleId(RoleId.wrapped(roleIdToken))
.build();
AuthenticationStepsExecutor executor = new AuthenticationStepsExecutor(
AppRoleAuthentication.createAuthenticationSteps(options), prepare()
.getRestTemplate());
AppRoleAuthentication.createAuthenticationSteps(options),
prepare().getRestTemplate());
assertThat(executor.login()).isNotNull();
}
@@ -81,8 +82,8 @@ public class AppRoleAuthenticationStepsIntegrationTests extends
.appRole("with-secret-id").initialToken(Settings.token()).build();
AuthenticationStepsExecutor executor = new AuthenticationStepsExecutor(
AppRoleAuthentication.createAuthenticationSteps(options), prepare()
.getRestTemplate());
AppRoleAuthentication.createAuthenticationSteps(options),
prepare().getRestTemplate());
assertThat(executor.login()).isNotNull();
}
@@ -97,8 +98,8 @@ public class AppRoleAuthenticationStepsIntegrationTests extends
.roleId(roleId).build();
AuthenticationStepsExecutor executor = new AuthenticationStepsExecutor(
AppRoleAuthentication.createAuthenticationSteps(options), prepare()
.getRestTemplate());
AppRoleAuthentication.createAuthenticationSteps(options),
prepare().getRestTemplate());
assertThat(executor.login()).isNotNull();
}
@@ -108,15 +109,16 @@ public class AppRoleAuthenticationStepsIntegrationTests extends
String secretId = (String) getVaultOperations()
.write(String.format("auth/approle/role/%s/secret-id", "with-secret-id"),
null).getData().get("secret_id");
null)
.getData().get("secret_id");
AppRoleAuthenticationOptions options = AppRoleAuthenticationOptions.builder()
.secretId(SecretId.provided(secretId)).appRole("with-secret-id")
.roleId(RoleId.pull(Settings.token())).build();
AuthenticationStepsExecutor executor = new AuthenticationStepsExecutor(
AppRoleAuthentication.createAuthenticationSteps(options), prepare()
.getRestTemplate());
AppRoleAuthentication.createAuthenticationSteps(options),
prepare().getRestTemplate());
assertThat(executor.login()).isNotNull();
}
@@ -130,8 +132,8 @@ public class AppRoleAuthenticationStepsIntegrationTests extends
.roleId(roleId).secretId("this-is-a-wrong-secret-id").build();
AuthenticationStepsExecutor executor = new AuthenticationStepsExecutor(
AppRoleAuthentication.createAuthenticationSteps(options), prepare()
.getRestTemplate());
AppRoleAuthentication.createAuthenticationSteps(options),
prepare().getRestTemplate());
assertThat(executor.login()).isNotNull();
}
@@ -150,8 +152,8 @@ public class AppRoleAuthenticationStepsIntegrationTests extends
.roleId(roleId).secretId(secretId).build();
AuthenticationStepsExecutor executor = new AuthenticationStepsExecutor(
AppRoleAuthentication.createAuthenticationSteps(options), prepare()
.getRestTemplate());
AppRoleAuthentication.createAuthenticationSteps(options),
prepare().getRestTemplate());
assertThat(executor.login()).isNotNull();
@@ -170,8 +172,8 @@ public class AppRoleAuthenticationStepsIntegrationTests extends
.build();
AuthenticationStepsExecutor executor = new AuthenticationStepsExecutor(
AppRoleAuthentication.createAuthenticationSteps(options), prepare()
.getRestTemplate());
AppRoleAuthentication.createAuthenticationSteps(options),
prepare().getRestTemplate());
assertThat(executor.login()).isNotNull();
}