Review deprecated code usage.
Suppress warnings for own deprecated code usage in tests as we provide types that are deprecated yet we want to cover these with tests. Move off external deprecated API. Closes gh-208.
This commit is contained in:
@@ -53,6 +53,7 @@ public class MySqlDatabaseSecretIntegrationTests extends IntegrationTestSupport
|
||||
|
||||
private VaultProperties vaultProperties = Settings.createVaultProperties();
|
||||
private VaultConfigOperations configOperations;
|
||||
@SuppressWarnings("deprecation")
|
||||
private VaultMySqlProperties mySql = new VaultMySqlProperties();
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,6 +51,7 @@ public class MySqlSecretIntegrationTests extends IntegrationTestSupport {
|
||||
|
||||
private VaultProperties vaultProperties = Settings.createVaultProperties();
|
||||
private VaultConfigOperations configOperations;
|
||||
@SuppressWarnings("deprecation")
|
||||
private VaultMySqlProperties mySql = new VaultMySqlProperties();
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,6 +57,7 @@ public class PostgreSqlSecretIntegrationTests extends IntegrationTestSupport {
|
||||
|
||||
private VaultProperties vaultProperties = Settings.createVaultProperties();
|
||||
private VaultConfigOperations configOperations;
|
||||
@SuppressWarnings("deprecation")
|
||||
private VaultPostgreSqlProperties postgreSql = new VaultPostgreSqlProperties();
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
/**
|
||||
* Tests for {@link VaultConfigDatabaseBootstrapConfiguration}.
|
||||
@@ -47,6 +47,7 @@ public class VaultConfigDatabaseBootstrapConfigurationTests
|
||||
@Autowired
|
||||
DatabaseSecretBackendMetadataFactory factory;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Autowired
|
||||
VaultMySqlProperties properties;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import org.springframework.boot.actuate.health.Health;
|
||||
import org.springframework.boot.actuate.health.Status;
|
||||
@@ -27,9 +27,8 @@ import org.springframework.vault.core.VaultOperations;
|
||||
import org.springframework.vault.core.VaultSysOperations;
|
||||
import org.springframework.vault.support.VaultHealth;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.reset;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link VaultHealthIndicator}.
|
||||
|
||||
@@ -19,15 +19,15 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.core.env.CompositePropertySource;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
import org.springframework.core.env.PropertySource;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link VaultPropertySourceLocator}.
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.vault.util;
|
||||
|
||||
import java.io.File;
|
||||
@@ -54,7 +53,8 @@ public class Settings {
|
||||
File workDir = findWorkDir();
|
||||
|
||||
return SslConfiguration.forTrustStore(
|
||||
new FileSystemResource(new File(workDir, "keystore.jks")), "changeit");
|
||||
new FileSystemResource(new File(workDir,
|
||||
"keystore.jks")), "changeit".toCharArray());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user