From 0b703f9007180bdee7aa5944185986be72a51a07 Mon Sep 17 00:00:00 2001 From: JinseongHwang Date: Thu, 21 Sep 2023 02:23:51 +0900 Subject: [PATCH] Use consistent capitalization in MySQL and MariaDB test names See gh-37497 --- .../connection/mariadb/MariaDbEnvironmentTests.java | 7 ++++--- .../service/connection/mysql/MySqlEnvironmentTests.java | 5 +++-- .../boot/testsupport/testcontainers/DockerImageNames.java | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironmentTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironmentTests.java index 5d05239c23..d291bfab1d 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironmentTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mariadb/MariaDbEnvironmentTests.java @@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; * @author Moritz Halbritter * @author Andy Wilkinson * @author Phillip Webb + * @author Jinseong Hwang */ class MariaDbEnvironmentTests { @@ -74,21 +75,21 @@ class MariaDbEnvironmentTests { } @Test - void getUsernameWhenHasMySqlUser() { + void getUsernameWhenHasMysqlUser() { MariaDbEnvironment environment = new MariaDbEnvironment( Map.of("MYSQL_USER", "myself", "MARIADB_PASSWORD", "secret", "MARIADB_DATABASE", "db")); assertThat(environment.getUsername()).isEqualTo("myself"); } @Test - void getUsernameWhenHasMariadbUserAndMySqlUser() { + void getUsernameWhenHasMariadbUserAndMysqlUser() { MariaDbEnvironment environment = new MariaDbEnvironment(Map.of("MARIADB_USER", "myself", "MYSQL_USER", "me", "MARIADB_PASSWORD", "secret", "MARIADB_DATABASE", "db")); assertThat(environment.getUsername()).isEqualTo("myself"); } @Test - void getUsernameWhenHasNoMariadbUserOrMySqlUser() { + void getUsernameWhenHasNoMariadbUserOrMysqlUser() { MariaDbEnvironment environment = new MariaDbEnvironment( Map.of("MARIADB_PASSWORD", "secret", "MARIADB_DATABASE", "db")); assertThat(environment.getUsername()).isEqualTo("root"); diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironmentTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironmentTests.java index 98cb7e4f8e..819d2ebd13 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironmentTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/mysql/MySqlEnvironmentTests.java @@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; * @author Moritz Halbritter * @author Andy Wilkinson * @author Phillip Webb + * @author Jinseong Hwang */ class MySqlEnvironmentTests { @@ -53,14 +54,14 @@ class MySqlEnvironmentTests { } @Test - void getUsernameWhenHasMySqlUser() { + void getUsernameWhenHasMysqlUser() { MySqlEnvironment environment = new MySqlEnvironment( Map.of("MYSQL_USER", "myself", "MYSQL_PASSWORD", "secret", "MYSQL_DATABASE", "db")); assertThat(environment.getUsername()).isEqualTo("myself"); } @Test - void getUsernameWhenHasNoMySqlUser() { + void getUsernameWhenHasNoMysqlUser() { MySqlEnvironment environment = new MySqlEnvironment(Map.of("MYSQL_PASSWORD", "secret", "MYSQL_DATABASE", "db")); assertThat(environment.getUsername()).isEqualTo("root"); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/testcontainers/DockerImageNames.java b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/testcontainers/DockerImageNames.java index 2dafbf32cf..304f2c7b1a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/testcontainers/DockerImageNames.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/testcontainers/DockerImageNames.java @@ -114,7 +114,7 @@ public final class DockerImageNames { /** * Return a {@link DockerImageName} suitable for running MariaDB. - * @return a docker image name for running Mariadb + * @return a docker image name for running MariaDB */ public static DockerImageName mariadb() { return DockerImageName.parse("mariadb").withTag(MARIADB_VERSION);