Replace remaining usage of [DEFAULT] sql_connection

The previous attempt[1] was incomplete and these was still one usage
left. The deprecated alias was removed from oslo.db[2] and no longer
works.

[1] b6b9f043ff
[2] bf90aed0f7b19441644de2be807ec680ad86b1b1

Change-Id: Ib3b0271057578a64ae556a11224e3b366ddf89bf
This commit is contained in:
Takashi Kajinami 2024-04-19 01:46:04 +09:00
parent 0bcd6cd71c
commit b38a567ad4

View File

@ -43,14 +43,14 @@ class TestGlanceManage(functional.FunctionalTest):
utils.safe_mkdirs(conf_dir)
self.conf_filepath = os.path.join(conf_dir, 'glance-manage.conf')
self.db_filepath = os.path.join(self.test_dir, 'tests.sqlite')
self.connection = ('sql_connection = sqlite:///%s' %
self.connection = ('connection = sqlite:///%s' %
self.db_filepath)
db_options.set_defaults(CONF, connection='sqlite:///%s' %
self.db_filepath)
def _db_command(self, db_method):
with open(self.conf_filepath, 'w') as conf_file:
conf_file.write('[DEFAULT]\n')
conf_file.write('[database]\n')
conf_file.write(self.connection)
conf_file.flush()
@ -60,7 +60,7 @@ class TestGlanceManage(functional.FunctionalTest):
def _check_db(self, expected_exitcode):
with open(self.conf_filepath, 'w') as conf_file:
conf_file.write('[DEFAULT]\n')
conf_file.write('[database]\n')
conf_file.write(self.connection)
conf_file.flush()