diff options
Diffstat (limited to 'ca/tests')
-rwxr-xr-x | ca/tests/bgpsec-yaml.py | 16 | ||||
-rwxr-xr-x | ca/tests/test-rrdp.py | 8 | ||||
-rw-r--r-- | ca/tests/yamltest.py | 10 |
3 files changed, 19 insertions, 15 deletions
diff --git a/ca/tests/bgpsec-yaml.py b/ca/tests/bgpsec-yaml.py index 1562f86e..d33184bf 100755 --- a/ca/tests/bgpsec-yaml.py +++ b/ca/tests/bgpsec-yaml.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # $Id$ -# +# # Copyright (C) 2014 Dragon Research Labs ("DRL") # # Permission to use, copy, modify, and distribute this software for any @@ -30,11 +30,11 @@ root = "Root" class Kid(object): - def __init__(self, n): - self.name = "ISP-%03d" % n - self.ipv4 = "10.%d.0.0/16" % n - self.asn = n - self.router_id = n * 10000 + def __init__(self, i): + self.name = "ISP-%03d" % i + self.ipv4 = "10.%d.0.0/16" % i + self.asn = i + self.router_id = i * 10000 @property def declare(self): @@ -72,12 +72,12 @@ docs.append([shell_first, gym = kids[50:70] for kid in gym: - docs.append([shell_next, + docs.append([shell_next, kid.del_routercert, sleeper]) for kid in gym: - docs.append([shell_next, + docs.append([shell_next, kid.add_routercert, sleeper]) diff --git a/ca/tests/test-rrdp.py b/ca/tests/test-rrdp.py index 9b7f207c..1a9db929 100755 --- a/ca/tests/test-rrdp.py +++ b/ca/tests/test-rrdp.py @@ -26,7 +26,7 @@ import time import signal import textwrap import argparse -import subprocess +import subprocess parser = argparse.ArgumentParser(description = __doc__) parser.add_argument("--use-smoketest", action = "store_true") @@ -88,9 +88,9 @@ else: def handle_sigusr1(signum, frame): raise GotSIGUSR1 old_sigusr1 = signal.signal(signal.SIGUSR1, handle_sigusr1) - argv = ("python", "yamltest.py", args.yaml_file, "--notify-when-startup-complete", str(os.getpid())) - log("Running: " + " ".join(argv)) - yamltest = subprocess.Popen(argv) + cmd = ("python", "yamltest.py", args.yaml_file, "--notify-when-startup-complete", str(os.getpid())) + log("Running: " + " ".join(cmd)) + yamltest = subprocess.Popen(cmd) log("Waiting for SIGUSR1 from yamltest") try: while True: diff --git a/ca/tests/yamltest.py b/ca/tests/yamltest.py index a279b530..71a83c14 100644 --- a/ca/tests/yamltest.py +++ b/ca/tests/yamltest.py @@ -446,9 +446,9 @@ class allocation(object): if not args.skip_config and args.store_router_private_keys: path = self.path("%s.routercerts.keys" % d.name) print "Writing", path - with open(path, "w") as f: - for r in self.router_certs: - f.write(r.keypair.get_PEM()) + with open(path, "w") as f: + for r in self.router_certs: + f.write(r.keypair.get_PEM()) @property def pubd(self): @@ -996,3 +996,7 @@ try: finally: if args.pidfile is not None: os.unlink(args.pidfile) + +# Local Variables: +# indent-tabs-mode: nil +# End: |