aboutsummaryrefslogtreecommitdiff
path: root/ca/tests
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-10-19 03:36:42 +0000
committerRob Austein <sra@hactrn.net>2015-10-19 03:36:42 +0000
commit7f5e75188ad4527e3c3425a155dfed0847a389dd (patch)
tree400301cae01f51141e380664cf0b382b8204a00d /ca/tests
parent7ab6040f7eb05a7ac4424e0294d228256e9a64dd (diff)
Amputate old SQL code out of rpkid with a fire axe, replacing it with
Django ORM. Duct tape and bailing wire everywhere, much clean-up left to do, but basic "make yamltest" suite runs. Much of the clean-up isn't worth doing until after revamping the I/O system, as it'll all change again at that point anyway. svn path=/branches/tk705/; revision=6127
Diffstat (limited to 'ca/tests')
-rw-r--r--ca/tests/sql-cleaner.py13
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()