Skip to content

Commit

Permalink
PostgreSQL: fix JNDI name jboss/datasources/testdb_postgres -> jboss/…
Browse files Browse the repository at this point in the history
…datasources/testdb_postgresql
  • Loading branch information
tommaso-borgato committed Nov 7, 2024
1 parent 8baa242 commit a02104e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions builder/src/main/java/cz/xtf/builder/db/PostgreSQL.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@

public class PostgreSQL extends AbstractSQLDatabase {
private static final String DEFAULT_SYMBOLIC_NAME = "POSTGRESQL";
private static final String OFFICIAL_IMAGE_DEFAULT_SYMBOLIC_NAME = "POSTGRES";

// data directory for the Red Hat image
private static final String DEFAULT_DATA_DIR = "/var/lib/pgsql/data";

// data directory for the Official Docker PostgreSQL image
private static final String OFFICIAL_IMAGE_DATA_DIR = "/var/lib/postgresql";
private static final String OFFICIAL_IMAGE_PGDATA_DIR = "/var/lib/postgresql/data";
private static final String OFFICIAL_IMAGE_DATA_DIR = "/var/lib/postgresql/data";
private static final String OFFICIAL_IMAGE_PGDATA_DIR = "/var/lib/postgresql/data/pgdata";

// env variables names for the Red Hat image
private static final String DEFAULT_POSTGRESQL_USER_ENV_VAR = "POSTGRESQL_USER";
Expand Down Expand Up @@ -76,7 +75,7 @@ public class PostgreSQL extends AbstractSQLDatabase {
public PostgreSQL(PostgreSQLBuilder postgreSQLBuilder) {
super(
(postgreSQLBuilder.symbolicName == null || postgreSQLBuilder.symbolicName.isEmpty())
? (postgreSQLBuilder.isOfficialImage ? OFFICIAL_IMAGE_DEFAULT_SYMBOLIC_NAME : DEFAULT_SYMBOLIC_NAME)
? DEFAULT_SYMBOLIC_NAME
: postgreSQLBuilder.symbolicName,
(postgreSQLBuilder.dataDir == null || postgreSQLBuilder.dataDir.isEmpty())
? (postgreSQLBuilder.isOfficialImage ? OFFICIAL_IMAGE_DATA_DIR : DEFAULT_DATA_DIR)
Expand Down

0 comments on commit a02104e

Please sign in to comment.