Allow previewing an older NixOS release with --downgrade

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
2026-11-09 08:25:36 +01:00
co-authored by Claude Sonnet 5.5
parent 1efa068443
commit b37d8a0961
5 changed files with 26 additions and 14 deletions
+2 -2
View File
@@ -135,8 +135,8 @@ func TestUpgradePage(t *testing.T) {
if r := request(); r["action"] != "check" || started != 1 {
t.Fatalf("%v started %d", r, started)
}
post("/upgrade/preview", url.Values{"force": {"on"}})
if r := request(); r["action"] != "preview" || r["force"] != true {
post("/upgrade/preview", url.Values{"force": {"on"}, "downgrade": {"on"}})
if r := request(); r["action"] != "preview" || r["force"] != true || r["downgrade"] != true {
t.Fatalf("%v", r)
}
if resp := post("/upgrade/format-disk", url.Values{}); resp.StatusCode != http.StatusNotFound {