isctest.run.cmd(
token_cleanup_command,
env=EMPTY_OPENSSL_CONF_ENV,
- log_stderr=False,
raise_on_exception=False,
)
try:
output = isctest.run.cmd(
- token_init_command, env=EMPTY_OPENSSL_CONF_ENV, log_stdout=True
+ token_init_command, env=EMPTY_OPENSSL_CONF_ENV
).stdout.decode("utf-8")
assert "The token has been initialized and is reassigned to slot" in output
yield
finally:
output = isctest.run.cmd(
- token_cleanup_command, env=EMPTY_OPENSSL_CONF_ENV, log_stdout=True
+ token_cleanup_command,
+ env=EMPTY_OPENSSL_CONF_ENV,
+ raise_on_exception=False,
).stdout.decode("utf-8")
assert re.search("Found token (.*) with matching token label", output)
assert re.search("The token (.*) has been deleted", output)
]
output = isctest.run.cmd(
- pkcs11_command, env=EMPTY_OPENSSL_CONF_ENV, log_stdout=True
+ pkcs11_command, env=EMPTY_OPENSSL_CONF_ENV
).stdout.decode("utf-8")
assert "Key pair generated" in output
zone,
]
- output = isctest.run.cmd(keyfrlab_command, log_stdout=True)
+ output = isctest.run.cmd(keyfrlab_command)
output_decoded = output.stdout.decode("utf-8").rstrip() + ".key"
assert os.path.exists(output_decoded)
zone,
zone_file,
]
- isctest.run.cmd(signer_command, log_stdout=True)
+ isctest.run.cmd(signer_command)
assert os.path.exists(f"{zone_file}.signed")
def test_max_rsa_exponent_size_bad(exponent_size, templates):
templates.render("options.conf", {"max_rsa_exponent_size": exponent_size})
with pytest.raises(subprocess.CalledProcessError):
- isctest.run.cmd([CHECKCONF, "options.conf"], log_stdout=True)
+ isctest.run.cmd([CHECKCONF, "options.conf"])
def test_rsa_big_exponent_keys_cant_load():
],
)
def test_verify_good_zone_files(zone):
- isctest.run.cmd([VERIFY, "-z", "-o", zone, f"zones/{zone}.good"], log_stdout=True)
+ isctest.run.cmd([VERIFY, "-z", "-o", zone, f"zones/{zone}.good"])
def test_verify_good_zone_nsec_next_name_case_mismatch():
"nsec-next-name-case-mismatch",
"zones/nsec-next-name-case-mismatch.good",
],
- log_stdout=True,
)
output = isctest.run.cmd(
[VERIFY, *only_opt, "-o", zone, f"zones/{zone}.bad"],
raise_on_exception=False,
- log_stdout=True,
)
stream = (output.stdout + output.stderr).decode("utf-8").replace("\n", "")
return stream