summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler
diff options
context:
space:
mode:
authoregernug <gerard.nugent@est.tech>2021-03-22 10:12:59 +0000
committeregernug <gerard.nugent@est.tech>2021-03-22 10:12:59 +0000
commiteaf9339670850e5321ad65519022d7f322e965a2 (patch)
treeaac1dc5c219f46766a9aa8e46c4d949629011fc9 /components/pm-subscription-handler
parenta652db5d8c8fb8a353893cf0e8c811cf0f3448e6 (diff)
[PMSH] Update to package version and url for Postgres
Issue-ID: INT-1865 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I0e0f72a1eb416269be462e67d3d221e49fe63120
Diffstat (limited to 'components/pm-subscription-handler')
-rw-r--r--components/pm-subscription-handler/pmsh_service/mod/__init__.py2
-rw-r--r--components/pm-subscription-handler/setup.py2
-rw-r--r--components/pm-subscription-handler/tests/test_pmsh_utils.py2
3 files changed, 3 insertions, 3 deletions
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()