This commit is contained in:
Ahmed Allam
2026-08-03 01:40:02 +00:00
parent dbc427d816
commit c071db79ee
25 changed files with 3016 additions and 10 deletions
+35 -1
View File
@@ -8,7 +8,12 @@ from typing import Any
import litellm
import pytest
from strix.core.inputs import build_root_task, child_initial_input, make_model_settings
from strix.core.inputs import (
build_root_task,
build_scan_targets,
child_initial_input,
make_model_settings,
)
def _child_kwargs(parent_history: list[Any]) -> dict[str, Any]:
@@ -318,3 +323,32 @@ def test_make_model_settings_timeout_survives_reasoning_resolve() -> None:
assert settings.extra_args is not None
assert settings.extra_args["timeout"] == 120.0
def test_scan_targets_prefer_the_workspace_checkout_over_the_remote_url() -> None:
config = {
"targets": [
{
"type": "repository",
"details": {
"target_repo": "https://github.com/acme/billing",
"workspace_subdir": "billing",
},
},
{"type": "web_application", "details": {"target_url": "https://app.example.com"}},
]
}
assert build_scan_targets(config) == ["/workspace/billing", "https://app.example.com"]
def test_scan_targets_drop_empty_and_duplicate_entries() -> None:
config = {
"targets": [
{"type": "web_application", "details": {"target_url": "https://app.example.com"}},
{"type": "web_application", "details": {"target_url": "https://app.example.com"}},
{"type": "ip_address", "details": {}},
]
}
assert build_scan_targets(config) == ["https://app.example.com"]