Skip to content

Commit

Permalink
Test: cts-exec: use PACEMAKER_CONFIG_DIR
Browse files Browse the repository at this point in the history
... instead of hardcoding /etc/pacemaker
  • Loading branch information
kgaillot committed Dec 18, 2024
1 parent 22b8974 commit a15c4cc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cts/cts-exec.in
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,13 @@ class ExecTests(Tests):
os.system("service pacemaker_remote stop")
self.cleanup_environment()

if self.tls and not os.path.isfile("/etc/pacemaker/authkey"):
print("Installing /etc/pacemaker/authkey ...")
os.system("mkdir -p /etc/pacemaker")
os.system("dd if=/dev/urandom of=/etc/pacemaker/authkey bs=4096 count=1")
self._installed_files.append("/etc/pacemaker/authkey")
# @TODO Support the option of using specified existing certificates
authkey = "%s/authkey" % BuildOptions.PACEMAKER_CONFIG_DIR
if self.tls and not os.path.isfile(authkey):
print("Installing %s ..." % authkey)
os.system("mkdir -p %s" % BuildOptions.PACEMAKER_CONFIG_DIR)
os.system("dd if=/dev/urandom of=%s bs=4096 count=1" % authkey)
self._installed_files.append(authkey)

# If we're in build directory, install agents if not already installed
# pylint: disable=protected-access
Expand Down

0 comments on commit a15c4cc

Please sign in to comment.