oracle: switch to entreprise (#9254)

* oracle: switch to entreprise

CHANGELOG_BEGIN
CHANGELOG_END

* --network host

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
This commit is contained in:
Gary Verhaegen 2021-03-29 16:56:30 +02:00 committed by GitHub
parent 8948e961db
commit cbba75a2c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -215,18 +215,22 @@ jobs:
export ORACLE_PORT=1521
export ORACLE_PWD=hunter2
docker login --username "$DOCKER_LOGIN" --password "$DOCKER_PASSWORD"
IMAGE=digitalasset/oracle-xe-18.4.0-preloaded:20210312-16-7009a64
IMAGE=digitalasset/oracle:enterprise-19.3.0-preloaded-20210325-22-be14fb7
docker pull $IMAGE
# Cleanup stray containers that might still be running from
# another build that didnt get shut down cleanly.
docker rm -f oracle || true
docker run -d --rm --name oracle -p $ORACLE_PORT:1521 -e ORACLE_PWD=$ORACLE_PWD $IMAGE
# Oracle does not like if you connect to it via localhost if its running in the container.
# Interestingly it works if you use the external IP of the host so the issue is
# not the host it is listening on (it claims for that to be 0.0.0.0).
# --network host is a cheap escape hatch for this.
docker run -d --rm --name oracle --network host -e ORACLE_PWD=$ORACLE_PWD $IMAGE
function cleanup() {
docker rm -f oracle
}
trap cleanup EXIT
testConnection() {
docker exec oracle bash -c 'sqlplus -L system/hunter2@//localhost:1521/XEPDB1 <<< "select * from dba_users;"; exit $?' >/dev/null
docker exec oracle bash -c 'sqlplus -L system/hunter2@//localhost:1521/ORCLPDB1 <<< "select * from dba_users;"; exit $?' >/dev/null
}
until testConnection
do

View File

@ -16,7 +16,7 @@ trait HttpServiceOracleInt extends AbstractHttpServiceIntegrationTestFuns with O
protected[this] lazy val jdbcConfig_ = JdbcConfig(
driver = "oracle.jdbc.OracleDriver",
url = s"jdbc:oracle:thin:@//localhost:$oraclePort/XEPDB1",
url = s"jdbc:oracle:thin:@localhost:$oraclePort/ORCLPDB1",
user = oracleUser,
password = oraclePwd,
createSchema = true,

View File

@ -37,7 +37,7 @@ trait OracleAround {
Using.Manager { use =>
val con = use(
DriverManager.getConnection(
s"jdbc:oracle:thin:@localhost:$port/XEPDB1",
s"jdbc:oracle:thin:@localhost:$port/ORCLPDB1",
systemUser,
systemPwd,
)
@ -54,7 +54,7 @@ trait OracleAround {
Using.Manager { use =>
val con = use(
DriverManager.getConnection(
s"jdbc:oracle:thin:@localhost:$port/XEPDB1",
s"jdbc:oracle:thin:@localhost:$port/ORCLPDB1",
systemUser,
systemPwd,
)