Files
ITWorx_MCP_Hub-Public/tests/test_managed_validation_action_pins.py

18 lines
792 B
Python

SETUP_DOTNET_V4_SHA = "67a3573c9a986a3f9c594539f4ab511d57bb3ce9"
def test_managed_validation_uses_resolvable_setup_dotnet_v4_pin() -> None:
with open(".gitea/workflows/managed-validation.yml", encoding="utf-8") as workflow_file:
workflow = workflow_file.read()
assert f"actions/setup-dotnet@{SETUP_DOTNET_V4_SHA}" in workflow
assert "actions/setup-dotnet@67a3573c9a9863f9c594539f4ab511d57bb3ce9" not in workflow
def test_managed_validation_uses_canonical_https_gitea_for_checkout() -> None:
with open(".gitea/workflows/managed-validation.yml", encoding="utf-8") as workflow_file:
workflow = workflow_file.read()
assert workflow.count("github-server-url: https://gitea.example.com") == 2
assert "http://gitea-runner-internal:3000" not in workflow