Explorar o código

Attempt to fix failing end-to-end database test that only fails in CI.

Dan Helfman %!s(int64=2) %!d(string=hai) anos
pai
achega
7e64f415ba
Modificáronse 4 ficheiros con 10 adicións e 7 borrados
  1. 5 4
      .drone.yml
  2. 1 0
      NEWS
  3. 1 0
      tests/end-to-end/docker-compose.yaml
  4. 3 3
      tests/end-to-end/test_database.py

+ 5 - 4
.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

+ 1 - 0
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.

+ 1 - 0
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:

+ 3 - 3
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