Revert "Fix detection logic for embedded databases"

This reverts commit c4a5a34702.

See gh-23721
This commit is contained in:
Stephane Nicoll
2020-10-19 12:25:00 +02:00
parent e8187f9bb0
commit dd74810c80
5 changed files with 17 additions and 188 deletions

View File

@@ -98,24 +98,6 @@ class DataSourcePropertiesTests {
assertThat(properties.determineUsername()).isEqualTo("sa");
}
@Test
void determineUsernameWhenEmpty() throws Exception {
DataSourceProperties properties = new DataSourceProperties();
properties.setUsername("");
properties.afterPropertiesSet();
assertThat(properties.getUsername());
assertThat(properties.determineUsername()).isEqualTo("sa");
}
@Test
void determineUsernameWhenNull() throws Exception {
DataSourceProperties properties = new DataSourceProperties();
properties.setUsername(null);
properties.afterPropertiesSet();
assertThat(properties.getUsername());
assertThat(properties.determineUsername()).isEqualTo("sa");
}
@Test
void determineUsernameWithExplicitConfig() throws Exception {
DataSourceProperties properties = new DataSourceProperties();
@@ -125,15 +107,6 @@ class DataSourcePropertiesTests {
assertThat(properties.determineUsername()).isEqualTo("foo");
}
@Test
void determineUsernameWithNonEmbeddedUrl() throws Exception {
DataSourceProperties properties = new DataSourceProperties();
properties.setUrl("jdbc:h2:~/test");
properties.afterPropertiesSet();
assertThat(properties.getPassword()).isNull();
assertThat(properties.determineUsername()).isNull();
}
@Test
void determinePassword() throws Exception {
DataSourceProperties properties = new DataSourceProperties();
@@ -151,15 +124,6 @@ class DataSourcePropertiesTests {
assertThat(properties.determinePassword()).isEqualTo("bar");
}
@Test
void determinePasswordWithNonEmbeddedUrl() throws Exception {
DataSourceProperties properties = new DataSourceProperties();
properties.setUrl("jdbc:h2:~/test");
properties.afterPropertiesSet();
assertThat(properties.getPassword()).isNull();
assertThat(properties.determinePassword()).isNull();
}
@Test
void determineCredentialsForSchemaScripts() {
DataSourceProperties properties = new DataSourceProperties();