Skip to content

How to pass "createOptions" / "configOptions" to DB2 container #116

@rPraml

Description

@rPraml

I'm unsure, if this is related to ebean-test-containers or ebean-test in the ebean-orm project

My Issue is, I need to pass "createOptions" to the test container.

We have ebean-test as dependency and we use

ebean.test.platform=db2
ebean.test.createOptions=USING CODESET UTF-8 TERRITORY DE COLLATE USING IDENTITY PAGESIZE 32768
ebean.test.configOptions=USING STRING_UNITS SYSTEM
...

for creating a container. The container spins up, but with wrong collation/pagesize. I debugged and I found, that only some properties are "transfered" from the properties file. These propertis are listed here:

https://github.com/ebean-orm/ebean/blob/master/ebean-test/src/main/java/io/ebean/test/config/platform/Config.java#L22

configOptions/createOptions are missing there...

I grepped, which parameters are in ebean-test-containers used and which parameters ebean-test transfers:

grep -irF "prop(properties" * -r \
  | grep -vE '"containerName"|"image"|"internalPort"|"startMode"|"shutdownMode"|"maxReadyAttempts"|"tmpfs"|"collation"|"characterSet"' \
  | grep -vE '"fastStartMode"|"inMemory"|"initSqlFile"|"seedSqlFile"|"adminUser"|"adminPassword"|"extraDb"|"extraDb.dbName"|"extraDb.username"|"extraDb.password"|"extraDb.extensions"|"extraDb.initSqlFile"|"extraDb.seedSqlFile"' \
  | grep -vE '"port"|"dbName"|"schema"|"username"|"password"|"url"|"driver"' \
  | awk -F '"' '{ print $2 }' | sort -u

And I got this list:

adminInternalPort
adminPort
adminUsername
agreeToSapLicense -> e.g this is manually set to "false" in HanaSetup.java
awsRegion
configOptions
createOptions
extensions
host
instanceNumber
mountsDirectory
passwordsUrl
services
startWeb

I have to say, I have not yet fully understood the process of how the parameters are translated between ebean-test and ebean-test-containers. I just see, that ebean.test.username is passed as db2.username to the container factory.

So if there is an other way to pass parameters, please point me to the right direction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions