aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-08-28 21:41:55 +0000
committerRob Austein <sra@hactrn.net>2014-08-28 21:41:55 +0000
commitf9237931ee7d7a9cdc024913c395a0cbfe395d5e (patch)
tree64b9dbe61d22d1531c91b7bce4a33c651c6d305c
parent7d2f78a06f177da1d7b27d41df48576ce9e9634e (diff)
RRDP test code had gotten a bit stale.
svn path=/branches/tk705/; revision=5942
-rwxr-xr-xca/tests/test-rrdp.py9
-rw-r--r--ca/tests/yamltest.py43
2 files changed, 28 insertions, 24 deletions
diff --git a/ca/tests/test-rrdp.py b/ca/tests/test-rrdp.py
index 9702c04a..de30a0f4 100755
--- a/ca/tests/test-rrdp.py
+++ b/ca/tests/test-rrdp.py
@@ -32,6 +32,7 @@ parser.add_argument("--use-smoketest", action = "store_true")
parser.add_argument("--yaml-file", default = "smoketest.2.yaml")
parser.add_argument("--delay", type = int, default = 300)
parser.add_argument("--exhaustive", action = "store_true")
+parser.add_argument("--skip-daemons", action = "store_true")
args = parser.parse_args()
def log(msg):
@@ -73,7 +74,9 @@ with open("rcynic-rrdp.conf", "w") as f:
else:
f.write("trust-anchor = yamltest.dir/RIR/publication/RIR-root/root.cer\n")
-if args.use_smoketest:
+if args.skip_daemons:
+ log("--skip-daemons specified, so running neither smoketest nor yamltest")
+elif args.use_smoketest:
run("python", "smoketest.py", args.yaml_file)
else:
run("python", "sql-cleaner.py")
@@ -84,8 +87,8 @@ else:
time.sleep(args.delay)
yamltest.terminate()
-snapshots = dict((snapshot_to_serial(fn), fn) for fn in dataglob("rrdp-publication/snapshot/*/*.xml"))
-deltas = dict((delta_to_serial(fn), fn) for fn in dataglob("rrdp-publication/deltas/*/*.xml"))
+snapshots = dict((snapshot_to_serial(fn), fn) for fn in dataglob("rrdp-publication/*/snapshot/*.xml"))
+deltas = dict((delta_to_serial(fn), fn) for fn in dataglob("rrdp-publication/*/deltas/*.xml"))
for snapshot in sorted(snapshots):
diff --git a/ca/tests/yamltest.py b/ca/tests/yamltest.py
index 0afa172b..67758e82 100644
--- a/ca/tests/yamltest.py
+++ b/ca/tests/yamltest.py
@@ -476,27 +476,28 @@ class allocation(object):
"""
r = dict(
- handle = self.name,
- run_rpkid = str(not self.is_hosted),
- run_pubd = str(self.runs_pubd),
- run_rootd = str(self.is_root),
- irdbd_sql_database = "irdb%d" % self.engine,
- irdbd_sql_username = "irdb",
- rpkid_sql_database = "rpki%d" % self.engine,
- rpkid_sql_username = "rpki",
- rpkid_server_host = "localhost",
- rpkid_server_port = str(self.rpkid_port),
- irdbd_server_host = "localhost",
- irdbd_server_port = str(self.irdbd_port),
- rootd_server_port = str(self.rootd_port),
- pubd_sql_database = "pubd%d" % self.engine,
- pubd_sql_username = "pubd",
- pubd_server_host = "localhost",
- pubd_server_port = str(self.pubd.pubd_port),
- publication_rsync_server = "localhost:%s" % self.pubd.rsync_port,
- bpki_servers_directory = self.path(),
- publication_base_directory = self.path("publication"),
- shared_sql_password = "fnord")
+ handle = self.name,
+ run_rpkid = str(not self.is_hosted),
+ run_pubd = str(self.runs_pubd),
+ run_rootd = str(self.is_root),
+ irdbd_sql_database = "irdb%d" % self.engine,
+ irdbd_sql_username = "irdb",
+ rpkid_sql_database = "rpki%d" % self.engine,
+ rpkid_sql_username = "rpki",
+ rpkid_server_host = "localhost",
+ rpkid_server_port = str(self.rpkid_port),
+ irdbd_server_host = "localhost",
+ irdbd_server_port = str(self.irdbd_port),
+ rootd_server_port = str(self.rootd_port),
+ pubd_sql_database = "pubd%d" % self.engine,
+ pubd_sql_username = "pubd",
+ pubd_server_host = "localhost",
+ pubd_server_port = str(self.pubd.pubd_port),
+ publication_rsync_server = "localhost:%s" % self.pubd.rsync_port,
+ bpki_servers_directory = self.path(),
+ publication_base_directory = self.path("publication"),
+ rrdp_publication_base_directory = self.path("rrdp-publication"),
+ shared_sql_password = "fnord")
r.update(config_overrides)