mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
fix(tests): use another db name on webserver to avoid colliding with repositories
This commit is contained in:
committed by
brian-mulier-p
parent
e37e2b0166
commit
15da58dbf4
@@ -6,9 +6,11 @@ services:
|
|||||||
MYSQL_USER: kestra
|
MYSQL_USER: kestra
|
||||||
MYSQL_PASSWORD: k3str4
|
MYSQL_PASSWORD: k3str4
|
||||||
MYSQL_ROOT_PASSWORD: "p4ssw0rd"
|
MYSQL_ROOT_PASSWORD: "p4ssw0rd"
|
||||||
command:
|
entrypoint: |
|
||||||
- --log-bin-trust-function-creators=1
|
sh -c "
|
||||||
- --sort-buffer-size=10485760
|
echo \"CREATE DATABASE IF NOT EXISTS kestra_unit_webserver;GRANT ALL PRIVILEGES ON kestra_unit_webserver.* TO 'kestra'@'%' WITH GRANT OPTION;\" > /docker-entrypoint-initdb.d/init.sql;
|
||||||
|
/usr/local/bin/docker-entrypoint.sh --log-bin-trust-function-creators=1 --innodb_ft_min_token_size=1 --ft_min_word_len=1 --sort-buffer-size=10485760
|
||||||
|
"
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
@@ -34,4 +36,4 @@ services:
|
|||||||
# - "4318:4318" # OTLP HTTP receiver
|
# - "4318:4318" # OTLP HTTP receiver
|
||||||
# - "14250:14250" # Receive from external otel-collector, optional
|
# - "14250:14250" # Receive from external otel-collector, optional
|
||||||
# environment:
|
# environment:
|
||||||
# - COLLECTOR_OTLP_ENABLED=true
|
# - COLLECTOR_OTLP_ENABLED=true
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.jooq.impl.DSL;
|
|||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import static io.kestra.core.utils.Rethrow.throwPredicate;
|
import static io.kestra.core.utils.Rethrow.throwPredicate;
|
||||||
|
|
||||||
@@ -43,10 +44,7 @@ public class JdbcTestUtils {
|
|||||||
.meta()
|
.meta()
|
||||||
.getTables()
|
.getTables()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(throwPredicate(table -> (table.getSchema().getName().equals(dataSource.getConnection().getCatalog())) ||
|
.filter(throwPredicate(table -> (table.getSchema().getName().equals(Optional.ofNullable(dataSource.getConnection().getSchema()).orElse(dataSource.getConnection().getCatalog())))))
|
||||||
table.getSchema().getName().equals("public") || // for Postgres
|
|
||||||
table.getSchema().getName().equals("dbo") // for SQLServer
|
|
||||||
))
|
|
||||||
.filter(table -> tableConfigs.getTableConfigs().stream().anyMatch(conf -> conf.table().equalsIgnoreCase(table.getName())))
|
.filter(table -> tableConfigs.getTableConfigs().stream().anyMatch(conf -> conf.table().equalsIgnoreCase(table.getName())))
|
||||||
.toList();
|
.toList();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ kestra:
|
|||||||
|
|
||||||
datasources:
|
datasources:
|
||||||
h2:
|
h2:
|
||||||
url: jdbc:h2:mem:public;TIME ZONE=UTC;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
url: jdbc:h2:mem:public_webserver;TIME ZONE=UTC;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
||||||
username: sa
|
username: sa
|
||||||
password: ""
|
password: ""
|
||||||
driverClassName: org.h2.Driver
|
driverClassName: org.h2.Driver
|
||||||
|
|||||||
Reference in New Issue
Block a user