first commit
This commit is contained in:
21
tests/test_config_mapping.py
Normal file
21
tests/test_config_mapping.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Tests for workflow config mapping."""
|
||||
|
||||
from simpl_open_credential_delivery.config import (
|
||||
simpl_open_gitea_workflow_config_mapping_fn,
|
||||
)
|
||||
|
||||
|
||||
def test_config_mapping_routes_inputs_to_ops():
|
||||
cfg = simpl_open_gitea_workflow_config_mapping_fn(
|
||||
{
|
||||
"repository_identifier": "simpl-open/platform-automation",
|
||||
"consumer_email": "consumer@example.local",
|
||||
"access_level": "read-only",
|
||||
"token_name_prefix": "simpl-open",
|
||||
"token_expiration_days": 30,
|
||||
}
|
||||
)
|
||||
|
||||
assert cfg["ops"]["generate_gitea_credentials"]["config"]["repository_identifier"] == "simpl-open/platform-automation"
|
||||
assert cfg["ops"]["generate_gitea_credentials"]["config"]["consumer_email"] == "consumer@example.local"
|
||||
assert cfg["ops"]["send_credentials_email"]["config"] == {}
|
||||
Reference in New Issue
Block a user