Skip to content

utils

drunc.fsm.actions.utils

Functions

validate_run_type(run_type)

Validate the run type :param run_type: the run type :return: the validated run type

Source code in drunc/fsm/actions/utils.py
def validate_run_type(run_type: str) -> str:
    """Validate the run type
    :param run_type: the run type
    :return: the validated run type
    """
    RUN_TYPES = ["PROD", "TEST"]
    if run_type not in RUN_TYPES:
        raise InvalidRunType(
            f"Invalid run type: '{run_type}'. Must be one of {RUN_TYPES}"
        )
    return run_type