mirror of
https://github.com/laurivosandi/certidude
synced 2025-09-10 15:31:04 +00:00
Add basic tests
This commit is contained in:
@@ -474,7 +474,10 @@ def certidude_setup_authority(parent, country, state, locality, organization, or
|
||||
|
||||
slug = os.path.basename(directory[:-1] if directory.endswith('/') else directory)
|
||||
if not slug:
|
||||
raise ValueError("Please supply proper target path")
|
||||
raise click.ClickException("Please supply proper target path")
|
||||
# Make sure slug is valid
|
||||
if not re.match(r"^[_a-zA-Z0-9]+$", slug):
|
||||
raise click.ClickException("CA name can contain only alphanumeric and '_' characters")
|
||||
|
||||
click.echo("CA configuration files are saved to: {}".format(os.path.abspath(slug)))
|
||||
|
||||
|
Reference in New Issue
Block a user