From 629cc1c9efd72328e3fb0289643cfe7f9b23aece Mon Sep 17 00:00:00 2001 From: Arnaud Poncet-Montanges Date: Wed, 23 Oct 2024 13:21:49 +0200 Subject: [PATCH] Fix pg_service 2nd try Fix pg_service 2nd try --- datamodel/test/test_schemas.py | 6 +++--- plugin/.docker/Dockerfile | 2 +- project/district_heating.qgs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/datamodel/test/test_schemas.py b/datamodel/test/test_schemas.py index 248d81c8..a84d8fe4 100755 --- a/datamodel/test/test_schemas.py +++ b/datamodel/test/test_schemas.py @@ -8,7 +8,7 @@ from .utils import DEFAULT_PG_SERVICE, DbTestBase -TWW_SCHEMAS = ("tdh_sys", "tdh_vl", "tdh_od", "tdh_cfg", "tdh_app") +TDH_SCHEMAS = ("tdh_sys", "tdh_vl", "tdh_od", "tdh_cfg", "tdh_app") PG_SCHEMAS = ("pg_toast", "information_schema", "pg_catalog", "public") @@ -23,7 +23,7 @@ def setUpClass(cls): cls.conn = psycopg.connect(f"service={pgservice}") def test_list_schemas(self): - schemas = ", ".join([f"'{schema}'" for schema in TWW_SCHEMAS + PG_SCHEMAS]) + schemas = ", ".join([f"'{schema}'" for schema in TDH_SCHEMAS + PG_SCHEMAS]) list_schemas = f"SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ({schemas});" self.check_empty(list_schemas) @@ -32,7 +32,7 @@ def test_app_schema(self): self.check_empty(list_tables) def test_data_schemas(self): - pg_schemas = ", ".join([f"'{schema}'" for schema in TWW_SCHEMAS + PG_SCHEMAS]) + pg_schemas = ", ".join([f"'{schema}'" for schema in TDH_SCHEMAS + PG_SCHEMAS]) list_views = ( "SELECT * FROM information_schema.tables WHERE table_type = 'VIEW' " f"AND table_schema NOT IN ('tdh_app', {pg_schemas})" diff --git a/plugin/.docker/Dockerfile b/plugin/.docker/Dockerfile index f8b7b24d..d656ed73 100644 --- a/plugin/.docker/Dockerfile +++ b/plugin/.docker/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get update && \ && rm -rf /var/lib/apt/lists/* RUN printf '[postgres]\nhost=db\ndbname=postgres\nuser=postgres\n' >> /etc/postgresql-common/pg_service.conf - RUN printf '[pg_tdh]\nhost=db\ndbname=tww\nuser=postgres\npassword=postgres\n' >> /etc/postgresql-common/pg_service.conf + RUN printf '[pg_tdh]\nhost=db\ndbname=tdh\nuser=postgres\npassword=postgres\n' >> /etc/postgresql-common/pg_service.conf # Some defaults ENV POSTGRES_PASSWORD=postgres diff --git a/project/district_heating.qgs b/project/district_heating.qgs index a344d807..8af33dc5 100644 --- a/project/district_heating.qgs +++ b/project/district_heating.qgs @@ -1,4 +1,4 @@ - + TEKSI District Heating