chore(test): replace the wtindex test file writer with testtree
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- testing-qa
Línea de trabajo
Empieza con writeFiles en internal/wtindex/prepare_test.go (alrededor de la línea 22) y con el helper testtree.Write en internal/testtree/testtree.go, y luego compara cómo crea cada uno los directorios padre y escribe los archivos. Añade testtree.WriteInto(t, root, files) y haz que Write delegue en él. Está terminado cuando se elimina writeFiles, sus 10 llamadas en prepare_test.go y equality_test.go usan testtree.WriteInto y las pruebas de wtindex siguen pasando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What kind of chore?
Test infrastructure
What needs doing?
writeFiles in internal/wtindex/prepare_test.go:22 repeats testtree.Write in internal/testtree/testtree.go. Both make the parent directories and write each file.
The copies differ in one way. writeFiles writes into a root that the caller passes, because worktreeFixture (internal/wtindex/prepare_test.go:37) creates the main checkout and the worktree itself. testtree.Write makes its own temporary directory.
Add testtree.WriteInto(t, root, files) and have Write call it. Then delete writeFiles and point its 10 call sites in internal/wtindex/prepare_test.go and internal/wtindex/equality_test.go at testtree.WriteInto.
Why now?
Two copies of the file writer can drift apart. A later fix to one copy will not reach the other. Tidiness is the trigger, so this is lower priority.
Issue #284 tracks the same kind of repeated test helper in other packages.
Does this touch anything load-bearing?
- The release pipeline (
release.yml,.goreleaser.yaml, signing) - The upgrade identity (
internal/upgrade/verify.go) - The perf baseline (
tools/bench/baseline.json) - The graph schema / meta-key layout
- None of these
Before submitting
- I searched existing issues and this is not a duplicate
🤖 Generated with Claude Code
- Lenguaje dominante
- Go
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 7 h 42 min
- PR fusionados (30 d)
- 111
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de seanb4t/codegraph-go
-
chore needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
seanb4t/codegraph-go#380 ·
Los mantenedores suelen responder en 1 día
-
chore needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
seanb4t/codegraph-go#379 ·
Los mantenedores suelen responder en 1 día
-
area:query chore needs-triage spec-needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
seanb4t/codegraph-go#377 ·
Los mantenedores suelen responder en 1 día
-
chore needs-triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
seanb4t/codegraph-go#362 ·
Los mantenedores suelen responder en 1 día
-
area:query bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
seanb4t/codegraph-go#355 ·
Los mantenedores suelen responder en 1 día
Todos los issues de seanb4t/codegraph-go
Issues similares
-
Add iterate GmbH domains to a dedicated list and include it in company and developer categoriesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
v2fly/domain-list-community#4307 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
notify: voice_queue rows are deleted only at startup, so a hub that stays up grows it without boundAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
mattabate/life-distributable#232 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día