Skip to content

Commit aada65f

Browse files
tbitcsoz-agent
andcommitted
fix: sandbox upgrade test uses 0.4.0 target (not current default)
The upgrade test previously used 0.3.0 as the target, which matched the new spec_version default. The upgrader correctly skips no-op upgrades, causing the test assertion 'Upgraded' in output to fail. Fix: upgrade to 0.4.0 (a future version) so the upgrade path runs. This is the correct test pattern — always test with a version AHEAD of the scaffold default. Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 680b410 commit aada65f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/sandbox/test_sandbox_new.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,17 @@ def test_full_scaffold_workflow(self, tmp_path: Path) -> None:
154154
assert compress_result.exit_code == 0
155155
assert "No compression needed" in compress_result.output
156156

157-
# ---- Step 13: Upgrade to new version ----
157+
# ---- Step 13: Upgrade to a future version ----
158+
# Use a version ahead of the current default so the upgrader actually runs.
159+
# (If target == current spec_version, upgrader skips — that's correct behavior.)
158160
upgrade_result = runner.invoke(
159-
main, ["upgrade", "--project-dir", str(project), "--spec-version", "0.3.0"]
161+
main, ["upgrade", "--project-dir", str(project), "--spec-version", "0.4.0"]
160162
)
161163
assert upgrade_result.exit_code == 0, f"Upgrade failed: {upgrade_result.output}"
162164
assert "Upgraded" in upgrade_result.output
163165
with open(saved) as f:
164166
upgraded_cfg = yaml.safe_load(f)
165-
assert upgraded_cfg["spec_version"] == "0.3.0"
167+
assert upgraded_cfg["spec_version"] == "0.4.0"
166168

167169
# ---- Step 14: Diff (may show differences after upgrade) ----
168170
diff_result = runner.invoke(main, ["diff", "--project-dir", str(project)])

0 commit comments

Comments
 (0)