Ariver
2026-06-03 ce96a0e5272d6bcdf732dd0fc1ff8a9d9c834a0c
privatevoice.src/internal/model/model_test.go
@@ -377,6 +377,20 @@
   }
}
func TestDownloadProfileRemovesStalePartialDownload(t *testing.T) {
   root := t.TempDir()
   stalePath := filepath.Join(root, ".downloads", DefaultModelID, "old-run", "model_package")
   writeTestFile(t, stalePath, "partial")
   err := DownloadProfile(DefaultModelProfile(), []string{"://bad-url"}, root, nil)
   if err == nil {
      t.Fatal("expected download failure")
   }
   if _, statErr := os.Stat(filepath.Dir(stalePath)); !os.IsNotExist(statErr) {
      t.Fatalf("stale download run still exists or stat failed: %v", statErr)
   }
}
func TestDownloadProfileFallsBackWhenPrimaryArchiveInvalid(t *testing.T) {
   root := t.TempDir()
   validArchive := tarArchive(t, map[string]string{