From eaf9339670850e5321ad65519022d7f322e965a2 Mon Sep 17 00:00:00 2001 From: egernug Date: Mon, 22 Mar 2021 10:12:59 +0000 Subject: [PMSH] Update to package version and url for Postgres Issue-ID: INT-1865 Signed-off-by: egernug Change-Id: I0e0f72a1eb416269be462e67d3d221e49fe63120 --- components/pm-subscription-handler/pmsh_service/mod/__init__.py | 2 +- components/pm-subscription-handler/setup.py | 2 +- components/pm-subscription-handler/tests/test_pmsh_utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'components/pm-subscription-handler') diff --git a/components/pm-subscription-handler/pmsh_service/mod/__init__.py b/components/pm-subscription-handler/pmsh_service/mod/__init__.py index 58cd8b3c..505add06 100644 --- a/components/pm-subscription-handler/pmsh_service/mod/__init__.py +++ b/components/pm-subscription-handler/pmsh_service/mod/__init__.py @@ -93,7 +93,7 @@ def get_db_connection_url(): pg_user_pass = os.getenv('PMSH_PG_PASSWORD') pmsh_db_name = os.getenv('PMSH_DB_NAME', 'pmsh') pmsh_db_port = os.getenv('PMSH_PG_PORT', '5432') - db_url = f'postgres+psycopg2://{quote(str(pg_user), safe="")}:' \ + db_url = f'postgresql+psycopg2://{quote(str(pg_user), safe="")}:' \ f'{quote(str(pg_user_pass), safe="")}@{pg_host}:{pmsh_db_port}/{pmsh_db_name}' if 'None' in db_url: raise Exception(f'Invalid DB connection URL: {db_url} .. exiting app!') diff --git a/components/pm-subscription-handler/setup.py b/components/pm-subscription-handler/setup.py index c8d90783..6a2ef242 100644 --- a/components/pm-subscription-handler/setup.py +++ b/components/pm-subscription-handler/setup.py @@ -36,7 +36,7 @@ setup( "flask_sqlalchemy==2.4.1", "Flask==1.1.1", "swagger-ui-bundle==0.0.6", - "psycopg2-binary==2.8.4", + "psycopg2-binary==2.8.6", "onap_dcae_cbs_docker_client==2.1.1", "onappylog==1.0.9", "ruamel.yaml==0.16.10", diff --git a/components/pm-subscription-handler/tests/test_pmsh_utils.py b/components/pm-subscription-handler/tests/test_pmsh_utils.py index 53d4fe64..5aab65e1 100644 --- a/components/pm-subscription-handler/tests/test_pmsh_utils.py +++ b/components/pm-subscription-handler/tests/test_pmsh_utils.py @@ -120,7 +120,7 @@ class PmshUtilsTestCase(BaseClassSetup): self.env.set('PMSH_PG_USERNAME', 'pmsh') self.env.set('PMSH_PG_PASSWORD', 'pass') db_url = get_db_connection_url() - self.assertEqual(db_url, 'postgres+psycopg2://pmsh:pass@1.2.3.4:5432/pmsh') + self.assertEqual(db_url, 'postgresql+psycopg2://pmsh:pass@1.2.3.4:5432/pmsh') def test_get_db_connection_url_fail(self): self.env = EnvironmentVarGuard() -- cgit 1.2.3-korg