Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/dbz-twin/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ services:
- ./output:/app/output

olr:
image: olr-dev:${OLR_IMAGE_TAG:-latest}
image: ${OLR_IMAGE:-olr-dev:latest}
user: "${OLR_UID:-1000}:${OLR_GID:-1000}"
container_name: dbz-olr
entrypoint: ["/bin/bash", "-c", "mkdir -p /olr-data/checkpoint && exec /opt/OpenLogReplicator/OpenLogReplicator \"$@\"", "--"]
command: ["-r", "-f", "/config/olr-config.json"]
Expand Down
3 changes: 2 additions & 1 deletion tests/environments/enterprise-19/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
olr:
image: olr-dev:${OLR_IMAGE_TAG:-latest}
image: ${OLR_IMAGE:-olr-dev:latest}
user: "${OLR_UID:-1000}:${OLR_GID:-1000}"
entrypoint: []
command: ["sleep", "infinity"]
volumes:
Expand Down
3 changes: 2 additions & 1 deletion tests/environments/free-23/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
olr:
image: olr-dev:${OLR_IMAGE_TAG:-latest}
image: ${OLR_IMAGE:-olr-dev:latest}
user: "${OLR_UID:-1000}:${OLR_GID:-1000}"
entrypoint: []
command: ["sleep", "infinity"]
volumes:
Expand Down
3 changes: 2 additions & 1 deletion tests/environments/xe-21-official/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
olr:
image: olr-dev:${OLR_IMAGE_TAG:-latest}
image: ${OLR_IMAGE:-olr-dev:latest}
user: "${OLR_UID:-1000}:${OLR_GID:-1000}"
entrypoint: []
command: ["sleep", "infinity"]
volumes:
Expand Down
3 changes: 2 additions & 1 deletion tests/environments/xe-21/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
olr:
image: olr-dev:${OLR_IMAGE_TAG:-latest}
image: ${OLR_IMAGE:-olr-dev:latest}
user: "${OLR_UID:-1000}:${OLR_GID:-1000}"
entrypoint: []
command: ["sleep", "infinity"]
volumes:
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def _run_olr(config_path, tmp_dir):
return subprocess.run(
[
"docker", "run", "--rm",
"--user", f"{os.getuid()}:{os.getgid()}",
"-v", f"{tmp_dir}:/olr-work",
"-v", f"{TESTS_DIR}:/tests:ro",
"--entrypoint", "/opt/OpenLogReplicator/OpenLogReplicator",
Expand Down
4 changes: 4 additions & 0 deletions tests/sql/scripts/drivers/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
# Container path prefix — tests/ is mounted here inside OLR container
_CONTAINER_TESTS="${_CONTAINER_TESTS:-/opt/OpenLogReplicator-local/tests}"

# Export UID/GID so docker-compose can set user: on the olr service
export OLR_UID="$(id -u)"
export OLR_GID="$(id -g)"

# ---- Overridable hook ----
patch_gencfg() { :; }

Expand Down
4 changes: 2 additions & 2 deletions tests/sql/scripts/drivers/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ source "$SCRIPT_DIR/drivers/base.sh"

: "${ORACLE_CONTAINER:=oracle}"

_DEXEC="docker exec"
_DEXEC="docker exec -e NLS_LANG=AMERICAN_AMERICA.AL32UTF8"
if [[ -n "${DOCKER_EXEC_USER:-}" ]]; then
_DEXEC="docker exec -u $DOCKER_EXEC_USER"
_DEXEC="docker exec -e NLS_LANG=AMERICAN_AMERICA.AL32UTF8 -u $DOCKER_EXEC_USER"
fi

_OLR_BINARY="/opt/OpenLogReplicator/OpenLogReplicator"
Expand Down
Loading