Files
application-template-code-l…/tests/test_config_mapping.py
Matteo Basile 0173ceecb3 first commit
2026-06-04 17:00:42 +02:00

22 lines
828 B
Python

"""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"] == {}