From cc741e1ac7fce9ce7117b4855d56e38749c04868 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 20 Aug 2017 18:21:34 -0400 Subject: - rework oracle de-provisioning to write URLs to the file as well, supporting custom dburi etc. Change-Id: Ic0ab0b3b4223e40fd335ee3313fda4dfce942100 --- lib/sqlalchemy/testing/plugin/plugin_base.py | 5 +++++ lib/sqlalchemy/testing/plugin/pytestplugin.py | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/testing/plugin') diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index 506a1c922..cab93a0e7 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -277,6 +277,11 @@ def _engine_uri(options, file_config): config._current = None for db_url in db_urls: + + if options.write_idents and provision.FOLLOWER_IDENT: # != 'master': + with open(options.write_idents, "a") as file_: + file_.write(provision.FOLLOWER_IDENT + " " + db_url + "\n") + cfg = provision.setup_config( db_url, options, file_config, provision.FOLLOWER_IDENT) diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py index d7da73828..377b4643c 100644 --- a/lib/sqlalchemy/testing/plugin/pytestplugin.py +++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py @@ -42,10 +42,6 @@ def pytest_configure(config): plugin_base.configure_follower( config.slaveinput["follower_ident"] ) - - if config.option.write_idents: - with open(config.option.write_idents, "a") as file_: - file_.write(config.slaveinput["follower_ident"] + "\n") else: if config.option.write_idents and \ os.path.exists(config.option.write_idents): -- cgit v1.2.1