Windows test failures in MockFileSystem.Walk due to path separator
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
- 82/100
Línea de trabajo
Lee el método Walk en cmd/importDir_test.go y los fixtures usados por TestImportDirectory y TestFindSpecificationFilesWithFS. Ejecuta go test -v ./cmd -run "TestImportDirectory|TestFindSpecificationFilesWithFS"; comprueba cómo se comparan las rutas de los fixtures bajo la raíz en Windows. La tarea está completada cuando el mock de Walk encuentra los archivos fixture y ambas pruebas pasan en Windows.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
The directory import tests fail on Windows because MockFileSystem.Walk uses the operating system's path separator to match child paths, while the mock filesystem fixtures use forward slashes.
In cmd/importDir_test.go, the Walk method contains this check:
if path == root || strings.HasPrefix(path, root+string(filepath.Separator)) {
For a root path of /test, the prefix is /test/ on Linux, which matches fixture paths such as /test/openapi.yaml.
On Windows, filepath.Separator is \, so the prefix becomes /test\. This does not match the forward-slash fixture paths, causing the mock filesystem to skip child files.
Steps to reproduce
On Windows, run:
go test -v ./cmd -run "TestImportDirectory|TestFindSpecificationFilesWithFS"
Actual behavior
Seven subtests fail across TestImportDirectory and TestFindSpecificationFilesWithFS.
The directory import tests report:
no specification files found in directory: /test
The file-discovery tests return no matching specification files, even though the fixtures contain them.
Expected behavior
MockFileSystem.Walk should traverse fixture paths consistently across operating systems, and the affected tests should pass on Windows.
Context
The current .github/workflows/build-verify.yml workflow runs tests on Ubuntu, so these Windows-specific test failures are not caught by the existing CI workflow. The project also builds Windows binaries.
Possible fix
Normalize the paths consistently before checking whether a fixture is under the requested root, so the mock filesystem's path matching does not depend on the host operating system.
Microcks version or git rev
Reproduced on Windows amd64 with Go 1.27.0. The exact repository commit SHA used for the reproduction can be added if available.
Install method
Not applicable. This issue concerns Go unit tests for the CLI's mock filesystem.
Additional information
The issue affects test infrastructure rather than the production directory-import implementation. The fix should preserve the existing import behavior while making the mock filesystem portable across operating systems.
- Lenguaje dominante
- Go
- Estrellas
- 59
- Forks
- 74
- Merge medio
- 5 d 17 h
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 microcks/microcks-cli
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
microcks/microcks-cli#598 ·
Los mantenedores suelen responder en 1 día
-
bug: microcks login ignores the --config flag and always modifies default configPosiblemente ocupada @aryarathoree la tomó hace 3 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
microcks/microcks-cli#594 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Wrong link to test resultsPosiblemente ocupada @SajanBisht la tomó hace 3 días. Abiertocomponent/cli keep-open kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
microcks/microcks-cli#589 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Default configuration path falls back to the current directory when the home directory cannot be determinedPosiblemente ocupada @Sarthak-Shreshtha01 la tomó hace 17 días. Abiertocomponent/cli kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
microcks/microcks-cli#583 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug: YAML parse error in config is silently swallowed, login overwrites all other contextsPosiblemente ocupada @Sarthak-Shreshtha01 la tomó hace 22 días. Abiertocomponent/cli kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
microcks/microcks-cli#572 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de microcks/microcks-cli
Issues similares
-
automation doc-healer documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
tsukumogami/tsuku#2804 ·
Los mantenedores suelen responder en 1 día
-
Anthropic /v1/messages: only the last thinking block of an assistant message is keptPosiblemente ocupada @Shayan12456 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
ollama/ollama#19415 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
raised-by:verifier
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
medici-finance/assay#5039 ·
Los mantenedores suelen responder en 1 día
-
metax CheckHealth reads Status.Capacity, so unhealthy Metax-GPU nodes are never cleaned upPosiblemente ocupada @barbierajput378-pixel la tomó hoy. Abiertokind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Project-HAMi/HAMi#3343 · 1 comentario ·
Los mantenedores suelen responder en 1 día