From 7e64f415ba74a6a491171181196b2d5a80c876da Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 21 Apr 2023 10:03:29 -0700 Subject: [PATCH] Attempt to fix failing end-to-end database test that only fails in CI. --- .drone.yml | 9 +++++---- NEWS | 1 + tests/end-to-end/docker-compose.yaml | 1 + tests/end-to-end/test_database.py | 6 +++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 11788468..f2c5f7d7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,17 +3,18 @@ name: python-3-8-alpine-3-13 services: - name: postgresql - image: postgres:13.1-alpine + image: docker.io/postgres:13.1-alpine environment: + POSTGRES_USER: test POSTGRES_PASSWORD: test POSTGRES_DB: test - name: mysql - image: mariadb:10.5 + image: docker.io/mariadb:10.5 environment: MYSQL_ROOT_PASSWORD: test MYSQL_DATABASE: test - name: mongodb - image: mongo:5.0.5 + image: docker.io/mongo:5.0.5 environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: test @@ -23,7 +24,7 @@ clone: steps: - name: build - image: alpine:3.13 + image: docker.io/alpine:3.13 environment: TEST_CONTAINER: true pull: always diff --git a/NEWS b/NEWS index 20214674..530a447f 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ commands with arguments. * #678: Fix calls to psql in PostgreSQL hook to ignore "~/.psqlrc", whose settings can break database dumping. + * #678: Fix calls to psql in PostgreSQL hook to abort on error during a database restore. * #682: Fix "source_directories_must_exist" option to expand globs and tildes in source directories. * #684: Rename "master" development branch to "main" to use more inclusive language. You'll need to update your development checkouts accordingly. diff --git a/tests/end-to-end/docker-compose.yaml b/tests/end-to-end/docker-compose.yaml index 0bbec8cc..f9895a8c 100644 --- a/tests/end-to-end/docker-compose.yaml +++ b/tests/end-to-end/docker-compose.yaml @@ -3,6 +3,7 @@ services: postgresql: image: docker.io/postgres:13.1-alpine environment: + POSTGRES_USER: test POSTGRES_PASSWORD: test POSTGRES_DB: test mysql: diff --git a/tests/end-to-end/test_database.py b/tests/end-to-end/test_database.py index 5c4e22cc..8b38e071 100644 --- a/tests/end-to-end/test_database.py +++ b/tests/end-to-end/test_database.py @@ -36,17 +36,17 @@ hooks: postgresql_databases: - name: test hostname: postgresql - username: postgres + username: test password: test format: {postgresql_dump_format} - name: all hostname: postgresql - username: postgres + username: test password: test - name: all format: custom hostname: postgresql - username: postgres + username: test password: test mysql_databases: - name: test