Skip to content
Snippets Groups Projects
Commit 8dbbb97e authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #8721: SW-280: processed review comment: do not depend on dbcredentials from disk

parent db2a0fe2
No related branches found
No related tags found
No related merge requests found
......@@ -63,11 +63,9 @@ def setUpModule():
dsn = test_psql.dsn()
logger.info(' created test postgres server, dsn=%s', dsn)
dbcreds = dbc.DBCredentials().get('LTASO')
if not dbcreds.password:
logger.warn('could not find lofar webservice.dbcredentials for ltaso test, please create a webservice.dbcreds file at ~/.lofar/dbcredentials/ltaso.ini with the proper credentials.')
exit(3) # special lofar test exit code: skipped test
dbcreds = dbc.Credentials()
dbcreds.user = 'test_user'
dbcreds.password = 'test_password'
with psycopg2.connect(**dsn) as conn:
cursor = conn.cursor()
......
......@@ -49,11 +49,9 @@ class TestLTAStorageDb(unittest.TestCase):
dsn = self.test_psql.dsn()
logger.info(' created test postgres server, dsn=%s', dsn)
self.dbcreds = dbc.DBCredentials().get('LTASO')
if not self.dbcreds.password:
logger.warn('could not find lofar dbcredentials for ltaso test, please create a dbcreds file at ~/.lofar/dbcredentials/ltaso.ini with the proper credentials.')
exit(3) # special lofar test exit code: skipped test
self.dbcreds = dbc.Credentials()
self.dbcreds.user = 'test_user'
self.dbcreds.password = 'test_password'
with psycopg2.connect(**dsn) as conn:
cursor = conn.cursor()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment