Skip to content

Commit

Permalink
Use a single version of testcontainers (helidon-io#8279)
Browse files Browse the repository at this point in the history
Fix version of mysql for vault tests

Signed-off-by: Tomas Langer <[email protected]>
  • Loading branch information
tomas-langer authored Jan 22, 2024
1 parent e221909 commit 727acc9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion tests/integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<name>Helidon Tests Integration</name>

<properties>
<version.lib.testcontainers>1.17.5</version.lib.testcontainers>
<version.lib.testcontainers.keycloak>2.3.0</version.lib.testcontainers.keycloak>
</properties>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -94,14 +94,16 @@ class VaultTest {
private static final String APPROLE_POLICY_NAME = "approle_policy";
private static final String APPROLE_ROLE_NAME = "approle_role";
private static final Duration TIMEOUT = Duration.ofSeconds(5);
private static final DockerImageName MYSQL_IMAGE = DockerImageName.parse("mysql:8");
private static final DockerImageName MYSQL_IMAGE = DockerImageName.parse("mysql:8.0.36");
private static final DockerImageName HCP_VAULT_IMAGE = DockerImageName.parse("vault:1.11.3");

private static final Network NETWORK = Network.newNetwork();
private static final String MYSQL_USER = "root";
private static final String MYSQL_PASSWORD = "changeit";
@Container
private static final MySQLContainer<?> MY_SQL_CONTAINER = new MySQLContainer<>(MYSQL_IMAGE)
.withUsername("root")
.withPassword("root")
.withUsername(MYSQL_USER)
.withPassword(MYSQL_PASSWORD)
.withNetworkAliases("mysql")
.withDatabaseName("pokemon")
.withNetwork(NETWORK);
Expand Down Expand Up @@ -278,8 +280,8 @@ void testDatabase() throws SQLException {
DbConfigure.Response dbConfigResponse = database
.configure(MySqlConfigureRequest.builder(connectionTemplate)
.name("mysql")
.username("root")
.password("root")
.username(MYSQL_USER)
.password(MYSQL_PASSWORD)
.maxOpenConnections(5)
.maxConnectionLifetime(Duration.ofMinutes(1))
.addAllowedRole("readonly"));
Expand Down

0 comments on commit 727acc9

Please sign in to comment.