Publish curated ITWorx_MCP_Hub source from 8823cc4d95756a93815c82b8ab62215be3d63862

This commit is contained in:
Public Source Publisher committed 2026-10-14 04:04:20 +00:00
1 parent 99caf1f968
commit 4766811350
3 files changed
+68 -4

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
# Public source export # Public source export
This source snapshot was generated from the private canonical repository at revision `0e2f0e88b0359a4ed82515b4b04c0f80069e5e0a`. It contains no private Git history or operational evidence. Changes are published from the canonical repository. This source snapshot was generated from the private canonical repository at revision `8823cc4d95756a93815c82b8ab62215be3d63862`. It contains no private Git history or operational evidence. Changes are published from the canonical repository.
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"sourceRevision": "0e2f0e88b0359a4ed82515b4b04c0f80069e5e0a", "sourceRevision": "8823cc4d95756a93815c82b8ab62215be3d63862",
"files": [ "files": [
{ {
"path": ".dockerignore", "path": ".dockerignore",
@@ -3359,8 +3359,8 @@
}, },
{ {
"path": "tests/test_mcp_hub_release_images.py", "path": "tests/test_mcp_hub_release_images.py",
"sha256": "fcf3a377e47f3e6a4b4410cfcb8f91e5bd9eee090de3ed52e2b581e5ed6417b7", "sha256": "c44fb08a07c73164769f97b70f42b5fc412de0ef85ee4a9af62a28b0bfccfd82",
"bytes": 21914 "bytes": 24244
}, },
{ {
"path": "tests/test_mcp_workflow_prompts.py", "path": "tests/test_mcp_workflow_prompts.py",
+64
View File
@@ -18,6 +18,70 @@ ROOT = Path(__file__).resolve().parents[1]
SCRIPT = ROOT / "scripts" / "build_mcp_hub_release_images.py" SCRIPT = ROOT / "scripts" / "build_mcp_hub_release_images.py"
@pytest.mark.parametrize(
"failure,category,code",
[("exit", "nonzero_exit", 7), ("timeout", "timeout", None), ("os", "exec_error", None)],
)
def test_fixed_stage_failure_reports_only_closed_phase_and_category(
tmp_path, capsys, failure, category, code
):
marker = "fixture-sensitive-output-must-not-escape"
def runner(command, **kwargs):
assert kwargs["stdout"] == subprocess.DEVNULL
assert kwargs["stderr"] == subprocess.DEVNULL
if failure == "timeout":
raise subprocess.TimeoutExpired([marker], 1, output=marker, stderr=marker)
if failure == "os":
raise OSError(marker)
return subprocess.CompletedProcess(command, code, stdout=marker, stderr=marker)
env = {
name: "fixture"
for name in (
"GITEA_COMMIT_SHA",
"APPOPS_SOURCE_TREE",
"APPOPS_BUILD_ID",
"APPOPS_BUILD_DATE",
"SOURCE_DATE_EPOCH",
)
}
with pytest.raises(producer.BuildRejected) as error:
producer._build_contextforge(tmp_path, env, runner=runner)
message = str(error.value)
assert "stage=contextforge_build" in message
assert f"category={category}" in message
assert (f"exitCode={code}" in message) if code is not None else "exitCode=" not in message
assert marker not in message
assert marker not in "".join(capsys.readouterr())
def test_unknown_stage_is_rejected_without_running_or_echoing_it(tmp_path):
def runner(*args, **kwargs):
pytest.fail("unknown stage must not execute")
with pytest.raises(producer.BuildRejected, match="^fixed release stage identifier is invalid$"):
producer._execute(
["fixture"],
env={},
cwd=tmp_path,
timeout=1,
stage="fixture-sensitive-stage",
runner=runner,
)
@pytest.mark.parametrize("code", [True, "fixture-sensitive-exit", 2**40])
def test_invalid_exit_code_is_not_echoed(tmp_path, code):
def runner(command, **kwargs):
return subprocess.CompletedProcess(command, code)
with pytest.raises(producer.BuildRejected, match="category=invalid_exit_code$"):
producer._execute(
["fixture"], env={}, cwd=tmp_path, timeout=1, stage="compose_local_build", runner=runner
)
def test_protected_metadata_uses_fixed_https_without_redirecting_credentials(monkeypatch): def test_protected_metadata_uses_fixed_https_without_redirecting_credentials(monkeypatch):
class Opener: class Opener:
def open(self, request, timeout): def open(self, request, timeout):