summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/provision.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/provision.py')
-rw-r--r--lib/sqlalchemy/testing/provision.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py
index 65a3c10a6..23d504b84 100644
--- a/lib/sqlalchemy/testing/provision.py
+++ b/lib/sqlalchemy/testing/provision.py
@@ -40,7 +40,6 @@ class register(object):
def create_follower_db(follower_ident):
-
for cfg in _configs_for_db_operation():
_create_db(cfg, cfg.db, follower_ident)
@@ -271,9 +270,14 @@ def _oracle_drop_db(cfg, eng, ident):
_ora_drop_ignore(conn, "%s_ts2" % ident)
-def reap_oracle_dbs(eng):
+def reap_oracle_dbs(eng, idents_file):
log.info("Reaping Oracle dbs...")
with eng.connect() as conn:
+ with open(idents_file) as file_:
+ idents = set(line.strip() for line in file_)
+
+ log.info("identifiers in file: %s", ", ".join(idents))
+
to_reap = conn.execute(
"select u.username from all_users u where username "
"like 'TEST_%' and not exists (select username "
@@ -283,7 +287,7 @@ def reap_oracle_dbs(eng):
for name in all_names:
if name.endswith("_ts1") or name.endswith("_ts2"):
continue
- else:
+ elif name in idents:
to_drop.add(name)
if "%s_ts1" % name in all_names:
to_drop.add("%s_ts1" % name)