lib.ec.secret_store: "content|config" -> "target"
Rename lib.ec.secret_store.layout.content_name() to target_name() and KvFile's config_path to target_path(). "Target" is a better name to settle on instead of "config" or "content". It's used in other contexts, too, referring to secret compilation output. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
ea751d3949
commit
48ec9fdb95
1 changed files with 63 additions and 60 deletions
|
|
@ -5,7 +5,7 @@ from jw.pkg.lib.ec.secret_store.layout import (
|
|||
FT_SECRET_FILE,
|
||||
FT_SECRET_KEY,
|
||||
SECRET_SUFFIX,
|
||||
content_name,
|
||||
target_name,
|
||||
host_prefix,
|
||||
)
|
||||
from jw.pkg.lib.file_types import FT_COMPOUND, FT_DIR, FT_REG
|
||||
|
|
@ -15,11 +15,11 @@ assert DEFAULT_PREFIX == 'default'
|
|||
assert SECRET_SUFFIX == '.jw-secret'
|
||||
assert BLOB_SUFFIX == '.jw-secret-file'
|
||||
|
||||
# content_name strips the content suffix, and names without a
|
||||
# target_name strips the content suffix, and names without a
|
||||
# content suffix are not store content
|
||||
assert content_name('etc/a.jw-secret') == 'etc/a'
|
||||
assert content_name('etc/c.pem.jw-secret-file') == 'etc/c.pem'
|
||||
assert content_name('etc/README.md') is None
|
||||
assert target_name('etc/a.jw-secret') == 'etc/a'
|
||||
assert target_name('etc/c.pem.jw-secret-file') == 'etc/c.pem'
|
||||
assert target_name('etc/README.md') is None
|
||||
|
||||
# An FQDN maps to its reversed, dot-split host root
|
||||
assert host_prefix('host.example.com') == 'com/example/host'
|
||||
|
|
|
|||
Loading…
Reference in a new issue