Skip to content

Commit a882615

Browse files
committed
Removed stale tests
1 parent 007edfb commit a882615

2 files changed

Lines changed: 8 additions & 74 deletions

File tree

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"""Tests for validate_plan.py."""
2-
import pytest
3-
42
from validate_plan import validate_schema_fields
53

64

@@ -17,35 +15,19 @@ def _minimal_plan() -> dict:
1715
}
1816

1917

20-
@pytest.mark.parametrize(
21-
("scenario", "repositories"),
22-
[
23-
(
24-
"single_secondary_entry",
25-
{"secondary": {"path": "/foo", "isPrimary": False}},
26-
),
27-
(
28-
"primary_and_secondary_entries",
29-
{
30-
"primary": {"path": "/abs/primary", "isPrimary": True},
31-
"frontend": {"path": "/abs/frontend", "isPrimary": False},
32-
},
33-
),
34-
],
35-
)
36-
def test_validate_schema_accepts_canonical_repositories(
37-
scenario: str, repositories: dict
38-
) -> None:
18+
def test_validate_schema_accepts_canonical_repositories() -> None:
3919
"""validate_schema_fields must accept the canonical multi-repo shape.
4020
4121
Each 'repositories' entry carries only `path` and `isPrimary` — the two
42-
fields the schema defines after the `type` field was removed. Both a
43-
single-entry shape and a multi-entry primary+secondary shape must
44-
validate without producing any issues.
22+
fields the schema defines after the `type` field was removed. A
23+
primary+secondary shape exercises both isPrimary branches.
4524
"""
4625
plan = _minimal_plan()
47-
plan["repositories"] = repositories
26+
plan["repositories"] = {
27+
"primary": {"path": "/abs/primary", "isPrimary": True},
28+
"frontend": {"path": "/abs/frontend", "isPrimary": False},
29+
}
4830

4931
issues = validate_schema_fields(plan)
5032

51-
assert issues == [], f"[{scenario}] expected no issues but got: {issues}"
33+
assert issues == [], f"expected no issues but got: {issues}"

plugins/code/tools/python/test_setup_closedloop.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@ def tmp_workdir(tmp_path: Path) -> Path:
1616
return tmp_path
1717

1818

19-
def run_setup(*extra_args: str, cwd: str | None = None) -> subprocess.CompletedProcess:
20-
"""Run setup-closedloop.sh with the given extra arguments."""
21-
workdir = cwd or str(extra_args[0]) if extra_args else "."
22-
return subprocess.run(
23-
["bash", str(SETUP_SCRIPT), workdir, *extra_args],
24-
capture_output=True,
25-
text=True,
26-
cwd=cwd or workdir,
27-
)
28-
29-
3019
def _run_setup_in_workdir(
3120
workdir: Path, *extra_args: str, cwd: str | None = None
3221
) -> subprocess.CompletedProcess:
@@ -86,13 +75,6 @@ def test_plan_relative_path_resolves_to_absolute(tmp_workdir: Path) -> None:
8675
pytest.fail("CLOSEDLOOP_PLAN_FILE not found in stdout")
8776

8877

89-
def test_plan_missing_value_exits_error(tmp_workdir: Path) -> None:
90-
"""Should fail when --plan flag is given with no following value."""
91-
result = _run_setup_in_workdir(tmp_workdir, "--plan")
92-
93-
assert result.returncode != 0
94-
95-
9678
def test_plan_skips_prd_autodiscovery(tmp_workdir: Path) -> None:
9779
"""Should not auto-discover prd.md when --plan is specified."""
9880
# Write a prd.md that would normally be auto-discovered
@@ -160,13 +142,6 @@ def _config_env(workdir: Path) -> str:
160142
return (workdir / ".closedloop" / "config.env").read_text()
161143

162144

163-
def test_add_dir_valid_directory_succeeds(tmp_workdir: Path, extra_repo: Path) -> None:
164-
"""Should succeed when --add-dir points to an existing directory."""
165-
result = _run_setup_in_workdir(tmp_workdir, "--add-dir", str(extra_repo))
166-
167-
assert result.returncode == 0, result.stderr
168-
169-
170145
def test_add_dir_nonexistent_path_fails(tmp_workdir: Path) -> None:
171146
"""Should exit non-zero when --add-dir path does not exist."""
172147
result = _run_setup_in_workdir(tmp_workdir, "--add-dir", "/nonexistent/path/does/not/exist")
@@ -185,17 +160,6 @@ def test_add_dir_writes_closedloop_add_dirs_to_config(tmp_workdir: Path, extra_r
185160
assert "CLOSEDLOOP_ADD_DIRS=" in config
186161

187162

188-
def test_add_dir_writes_closedloop_add_dir_names_to_config(tmp_workdir: Path, extra_repo: Path) -> None:
189-
"""config.env must contain CLOSEDLOOP_ADD_DIR_NAMES derived from directory basename."""
190-
result = _run_setup_in_workdir(tmp_workdir, "--add-dir", str(extra_repo))
191-
192-
assert result.returncode == 0, result.stderr
193-
config = _config_env(tmp_workdir)
194-
assert "CLOSEDLOOP_ADD_DIR_NAMES=" in config
195-
# basename of extra_repo is "extra-repo"
196-
assert "extra-repo" in config
197-
198-
199163
def test_add_dir_writes_closedloop_repo_map_to_config(tmp_workdir: Path, extra_repo: Path) -> None:
200164
"""config.env must contain CLOSEDLOOP_REPO_MAP in name=path format."""
201165
result = _run_setup_in_workdir(tmp_workdir, "--add-dir", str(extra_repo))
@@ -222,18 +186,6 @@ def test_add_dir_uses_identity_file_name(tmp_workdir: Path, tmp_path: Path) -> N
222186
assert "my-custom-name" in config
223187

224188

225-
def test_add_dir_falls_back_to_basename_when_no_identity(tmp_workdir: Path, tmp_path: Path) -> None:
226-
"""Should use basename when .repo-identity.json is absent."""
227-
unnamed_repo = tmp_path / "unnamed-service"
228-
unnamed_repo.mkdir()
229-
230-
result = _run_setup_in_workdir(tmp_workdir, "--add-dir", str(unnamed_repo))
231-
232-
assert result.returncode == 0, result.stderr
233-
config = _config_env(tmp_workdir)
234-
assert "unnamed-service" in config
235-
236-
237189
def test_multiple_add_dirs_produces_pipe_joined_values(tmp_workdir: Path, tmp_path: Path) -> None:
238190
"""Multiple --add-dir flags should produce pipe-separated values in config.env."""
239191
repo_a = tmp_path / "repo-a"

0 commit comments

Comments
 (0)