Files
application-template-code-l…/tests/test_config_mapping.py
ILay 6970b27095
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 10s
Update access level to 'read' in configuration and tests
2026-06-16 18:45:30 +02:00

22 lines
823 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",
"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"] == {}