From 05686165b30db60d815d69cb5624f23be007f398 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 1 Aug 2019 09:15:47 +0200 Subject: [PATCH] Upgrade TravisCI to use Java 12. Original pull request: #454. --- .mvn/wrapper/maven-wrapper.properties | 2 +- .travis.yml | 2 +- ...leAuthenticationStepsIntegrationTests.java | 46 ++++++++++--------- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index c3150437..a3ba20ec 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -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 diff --git a/.travis.yml b/.travis.yml index 6b362c9a..af347a8d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: java jdk: - - oraclejdk8 + - openjdk12 sudo: required diff --git a/spring-vault-core/src/test/java/org/springframework/vault/authentication/AppRoleAuthenticationStepsIntegrationTests.java b/spring-vault-core/src/test/java/org/springframework/vault/authentication/AppRoleAuthenticationStepsIntegrationTests.java index d63434c7..29504924 100644 --- a/spring-vault-core/src/test/java/org/springframework/vault/authentication/AppRoleAuthenticationStepsIntegrationTests.java +++ b/spring-vault-core/src/test/java/org/springframework/vault/authentication/AppRoleAuthenticationStepsIntegrationTests.java @@ -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(); }