Created
May 17, 2023 14:41
-
-
Save eddumelendez/2fbba043b686ea2a50d0d26bfe2faab3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@DataJdbcTest(properties = { "spring.datasource.url=jdbc:tc:postgresql:15-alpine:///" }) | |
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) | |
class PostgresHostLessTest { | |
@Autowired | |
private JdbcTemplate jdbcTemplate; | |
@Test | |
void test() { | |
var records = this.jdbcTemplate.queryForList("select count(*) from profile"); | |
assertThat(records).hasSize(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment