[PMSH] Update to package version and url for Postgres 78/119578/1
authoregernug <gerard.nugent@est.tech>
Mon, 22 Mar 2021 10:12:59 +0000 (10:12 +0000)
committeregernug <gerard.nugent@est.tech>
Mon, 22 Mar 2021 10:12:59 +0000 (10:12 +0000)
Issue-ID: INT-1865

Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: I0e0f72a1eb416269be462e67d3d221e49fe63120

components/pm-subscription-handler/pmsh_service/mod/__init__.py
components/pm-subscription-handler/setup.py
components/pm-subscription-handler/tests/test_pmsh_utils.py

index 58cd8b3..505add0 100644 (file)
@@ -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!')
index c8d9078..6a2ef24 100644 (file)
@@ -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",
index 53d4fe6..5aab65e 100644 (file)
@@ -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()