Skip to content

Commit

Permalink
Merge pull request #44191 from gsmet/update-images
Browse files Browse the repository at this point in the history
Update PostgreSQL image to 17
  • Loading branch information
geoand authored Oct 31, 2024
2 parents 4e34202 + 786e6a8 commit 88d274b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<junit-pioneer.version>2.2.0</junit-pioneer.version>

<!-- Database images for JDBC/Reactive/Hibernate tests and devservices -->
<postgres.image>docker.io/postgres:14</postgres.image>
<postgres.image>docker.io/postgres:17</postgres.image>
<mariadb.image>docker.io/mariadb:10.11</mariadb.image>
<db2.image>icr.io/db2_community/db2:11.5.9.0</db2.image>
<mssql.image>mcr.microsoft.com/mssql/server:2022-latest</mssql.image>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public String returnInitSql() {
@GET
@Path("init-sql-result")
public Integer returnInitSqlResult() {
return (Integer) entityManager.createNativeQuery("SELECT f_my_constant()")
return (Integer) entityManager.createNativeQuery("SELECT TEST_SCHEMA.f_my_constant()")
.getSingleResult();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ quarkus.flyway.placeholders.foo=bar
quarkus.flyway.placeholders.title=REPLACED
quarkus.flyway.placeholder-prefix=#[
quarkus.flyway.placeholder-suffix=]
quarkus.flyway.init-sql=CREATE SCHEMA IF NOT EXISTS TEST_SCHEMA;CREATE OR REPLACE FUNCTION f_my_constant() RETURNS integer LANGUAGE plpgsql as $func$ BEGIN return 100; END $func$;
quarkus.flyway.init-sql=CREATE SCHEMA IF NOT EXISTS TEST_SCHEMA;CREATE OR REPLACE FUNCTION TEST_SCHEMA.f_my_constant() RETURNS integer LANGUAGE plpgsql as $func$ BEGIN return 100; END $func$;
quarkus.hibernate-orm.database.generation=validate

# second Agroal config
Expand All @@ -33,4 +33,4 @@ quarkus.flyway.second-datasource.locations=db/location3
quarkus.flyway.second-datasource.sql-migration-prefix=V
quarkus.flyway.second-datasource.migrate-at-start=true
quarkus.flyway.second-datasource.placeholders.mambo=poa

quarkus.flyway.second-datasource.init-sql=CREATE SCHEMA IF NOT EXISTS TEST_SCHEMA;
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
CREATE TABLE multiple_flyway_test

CREATE TABLE TEST_SCHEMA.multiple_flyway_test
(
id INT,
name VARCHAR(255)
);
INSERT INTO multiple_flyway_test(id, name)
INSERT INTO TEST_SCHEMA.multiple_flyway_test(id, name)
VALUES (1, 'Multiple flyway datasources should work seamlessly in JVM and native mode');
Original file line number Diff line number Diff line change
@@ -1 +1 @@
select count(1) from multiple_flyway_test;
select count(1) from TEST_SCHEMA.multiple_flyway_test;
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public void testPlaceholdersPrefixSuffix() {
}

@Test
@DisplayName("Returns whether the init-sql is CREATE SCHEMA IF NOT EXISTS TEST_SCHEMA;CREATE OR REPLACE FUNCTION f_my_constant() RETURNS integer LANGUAGE plpgsql as $func$ BEGIN return 100; END $func$; or not")
@DisplayName("Returns whether the init-sql is CREATE SCHEMA IF NOT EXISTS TEST_SCHEMA;CREATE OR REPLACE FUNCTION TEST_SCHEMA.f_my_constant() RETURNS integer LANGUAGE plpgsql as $func$ BEGIN return 100; END $func$; or not")
public void testReturnInitSql() {
when().get("/flyway/init-sql").then().body(is(
"CREATE SCHEMA IF NOT EXISTS TEST_SCHEMA;CREATE OR REPLACE FUNCTION f_my_constant() RETURNS integer LANGUAGE plpgsql as $func$ BEGIN return 100; END $func$;"));
"CREATE SCHEMA IF NOT EXISTS TEST_SCHEMA;CREATE OR REPLACE FUNCTION TEST_SCHEMA.f_my_constant() RETURNS integer LANGUAGE plpgsql as $func$ BEGIN return 100; END $func$;"));
}

@Test
Expand Down

0 comments on commit 88d274b

Please sign in to comment.