diff options
Diffstat (limited to 'ca/tests/sql-cleaner.py')
-rw-r--r-- | ca/tests/sql-cleaner.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/ca/tests/sql-cleaner.py b/ca/tests/sql-cleaner.py index 369a68ea..828100a4 100644 --- a/ca/tests/sql-cleaner.py +++ b/ca/tests/sql-cleaner.py @@ -19,7 +19,6 @@ """ import rpki.config -import rpki.sql_schemas from rpki.mysql_import import MySQLdb cfg = rpki.config.parser(section = "yamltest", allow_missing = True) @@ -29,15 +28,6 @@ for name in ("rpkid", "irdbd", "pubd"): username = cfg.get("%s_sql_username" % name, name[:4]) password = cfg.get("%s_sql_password" % name, "fnord") - # All of this schema creation stuff will go away once we're on Django ORM. - # For the moment, a quick kludge for testing. - schema = [] - if name == "rpkid": - for line in getattr(rpki.sql_schemas, name, "").splitlines(): - schema.extend(line.partition("--")[0].split()) - schema = " ".join(schema).strip(";").split(";") - schema = [statement.strip() for statement in schema if statement and "DROP TABLE" not in statement] - db = MySQLdb.connect(user = username, passwd = password) cur = db.cursor() @@ -57,8 +47,5 @@ for name in ("rpkid", "irdbd", "pubd"): cur.execute("DROP TABLE %s" % table) cur.execute("SET foreign_key_checks = 1") - for statement in schema: - cur.execute(statement) - cur.close() db.close() |