ebean-orm / ebean-orm/ebean-test-containers
How to pass "createOptions" / "configOptions" to DB2 container
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
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:
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ebean-test/src/main/java/io/ebean/test/config/platform/Config.java and trace how properties from ebean-test are transferred to ebean-test-containers. Compare the handling of createOptions and configOptions with the existing database properties, then verify that the DB2 container receives both values and applies the requested collation and page size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- databases, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100