From c6cc7d300be27cd3dfb80e8352978b9336f1e8c9 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Tue, 18 Aug 2026 21:57:46 +0200 Subject: [PATCH] =?UTF-8?q?Test=20moteur=20OCI=20:=20bit=20ex=C3=A9cutable?= =?UTF-8?q?=20sans=20objet=20sous=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 --- internal/loki/backend_engine_oci_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/loki/backend_engine_oci_test.go b/internal/loki/backend_engine_oci_test.go index 0b9dad1..22e52d7 100644 --- a/internal/loki/backend_engine_oci_test.go +++ b/internal/loki/backend_engine_oci_test.go @@ -24,6 +24,7 @@ import ( "net/http/httptest" "os" "path/filepath" + "runtime" "strings" "testing" ) @@ -202,7 +203,10 @@ func TestInstallationMoteurDepuisImage(t *testing.T) { if isDir(filepath.Join(dir, "etc")) || isDir(filepath.Join(dir, "usr")) { t.Error("des fichiers hors /app ont été extraits") } - if st, err := os.Stat(bin); err != nil || st.Mode()&0o100 == 0 { + // Windows n'a pas de bit exécutable : Stat y renvoie 0666/0444 quoi qu'il + // arrive, et l'assertion échouait toujours — alors que l'installation, elle, + // est correcte (le bit est bien posé côté Linux, là où le moteur tourne). + if st, err := os.Stat(bin); err != nil || (runtime.GOOS != "windows" && st.Mode()&0o100 == 0) { t.Errorf("llama-server non exécutable : %v", err) }