aboutsummaryrefslogtreecommitdiff
path: root/rpkid/tests
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2012-08-20 21:58:12 +0000
committerRob Austein <sra@hactrn.net>2012-08-20 21:58:12 +0000
commite42948305301058ab7f9298e715ae14272068fb0 (patch)
treedb8e69aa5108e199b765207a7be693c51cff391f /rpkid/tests
parentf5aceabc0e5aac9d2686c69ab07c2d734e981e21 (diff)
Extend insecure-debug-only-rsa-key hack to something we can use with
rpkic under yamltest. svn path=/branches/tk274/; revision=4649
Diffstat (limited to 'rpkid/tests')
-rw-r--r--rpkid/tests/yamltest.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/rpkid/tests/yamltest.py b/rpkid/tests/yamltest.py
index 6d4a6381..47c53c19 100644
--- a/rpkid/tests/yamltest.py
+++ b/rpkid/tests/yamltest.py
@@ -168,6 +168,7 @@ class allocation(object):
pubd_port = -1
rsync_port = -1
rootd_port = -1
+ rpkic_counter = 0L
@classmethod
def allocate_port(cls):
@@ -429,6 +430,11 @@ class allocation(object):
"comment = RPKI test"))
f.close()
+ @classmethod
+ def next_rpkic_counter(cls):
+ cls.rpkic_counter += 10000
+ return str(cls.rpkic_counter)
+
def run_rpkic(self, *args):
"""
Run rpkic for this entity.
@@ -439,7 +445,9 @@ class allocation(object):
cmd.append(self.path("rpkic.%s.prof" % rpki.sundial.now()))
cmd.extend(a for a in args if a is not None)
print 'Running "%s"' % " ".join(cmd)
- subprocess.check_call(cmd, cwd = self.host.path())
+ env = os.environ.copy()
+ env["YAMLTEST_RPKIC_COUNTER"] = self.next_rpkic_counter()
+ subprocess.check_call(cmd, cwd = self.host.path(), env = env)
def run_python_daemon(self, prog):
"""