Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alco committed May 20, 2024
1 parent 8dd26f8 commit 850693d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ log_dev_env:
docker compose -f ${DOCKER_COMPOSE_FILE} logs --no-color --follow pg_1

start_electric_%:
docker compose -f ${DOCKER_COMPOSE_FILE} up --no-color --no-log-prefix electric_$*
${ENV} docker compose -f ${DOCKER_COMPOSE_FILE} up --no-color --no-log-prefix electric_$*

stop_electric_%:
docker compose -f ${DOCKER_COMPOSE_FILE} stop electric_$*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[doc Validate Electric's error reporting when it encounters configuration problems]
[include _shared.luxinc]

[newshell electric]
[invoke start_electric_with_env "DATABASE_URL=http://"]
-
??CONFIGURATION ERROR

??DATABASE_URL has invalid URL scheme: "http"

??Please review the official configuration reference at
??https://electric-sql.com/docs/api/service

[cleanup]
[invoke teardown]
5 changes: 5 additions & 0 deletions e2e/tests/_shared.luxinc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
-$fail_pattern
[endmacro]

[macro start_electric_with_env env_str]
!${env_str} make start_electric_1
-$fail_pattern
[endmacro]

[macro stop_electric n]
!make stop_electric_${n}
??Stopped
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
file: ../services_templates.yaml
service: electric
environment:
DATABASE_URL: postgresql://postgres:password@pg_1:5432/electric
DATABASE_URL: "${DATABASE_URL:-postgresql://postgres:password@pg_1:5432/electric}"
DATABASE_REQUIRE_SSL: false
ELECTRIC_WRITE_TO_PG_MODE: "${ELECTRIC_WRITE_TO_PG_MODE:-logical_replication}"
LOGICAL_PUBLISHER_HOST: electric_1
Expand Down

0 comments on commit 850693d

Please sign in to comment.