From e35d7cb3b38e5e5ce56ac343b57f5255bde1bd15 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 22 Jan 2026 21:47:50 +0000 Subject: [PATCH] chore: drop test file the function now was removed Signed-off-by: Ettore Di Giacinto --- core/http/openai_mapping_test.go | 75 -------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 core/http/openai_mapping_test.go diff --git a/core/http/openai_mapping_test.go b/core/http/openai_mapping_test.go deleted file mode 100644 index a1dc44b39..000000000 --- a/core/http/openai_mapping_test.go +++ /dev/null @@ -1,75 +0,0 @@ -package http_test - -import ( - "encoding/json" - - openai "github.com/mudler/LocalAI/core/http/endpoints/openai" - "github.com/mudler/LocalAI/core/schema" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("MapOpenAIToVideo", func() { - It("maps size and seconds correctly", func() { - cases := []struct { - name string - input *schema.OpenAIRequest - raw map[string]interface{} - expectsW int32 - expectsH int32 - expectsF int32 - expectsN int32 - }{ - { - name: "size in input", - input: &schema.OpenAIRequest{ - PredictionOptions: schema.PredictionOptions{ - BasicModelRequest: schema.BasicModelRequest{Model: "m"}, - }, - Size: "256x128", - }, - expectsW: 256, - expectsH: 128, - }, - { - name: "size in raw and seconds as string", - input: &schema.OpenAIRequest{PredictionOptions: schema.PredictionOptions{BasicModelRequest: schema.BasicModelRequest{Model: "m"}}}, - raw: map[string]interface{}{"size": "720x480", "seconds": "2"}, - expectsW: 720, - expectsH: 480, - expectsF: 30, - expectsN: 60, - }, - { - name: "seconds as number and fps override", - input: &schema.OpenAIRequest{PredictionOptions: schema.PredictionOptions{BasicModelRequest: schema.BasicModelRequest{Model: "m"}}}, - raw: map[string]interface{}{"seconds": 3.0, "fps": 24.0}, - expectsF: 24, - expectsN: 72, - }, - } - - for _, c := range cases { - By(c.name) - vr := openai.MapOpenAIToVideo(c.input, c.raw) - if c.expectsW != 0 { - Expect(vr.Width).To(Equal(c.expectsW)) - } - if c.expectsH != 0 { - Expect(vr.Height).To(Equal(c.expectsH)) - } - if c.expectsF != 0 { - Expect(vr.FPS).To(Equal(c.expectsF)) - } - if c.expectsN != 0 { - Expect(vr.NumFrames).To(Equal(c.expectsN)) - } - - b, err := json.Marshal(vr) - Expect(err).ToNot(HaveOccurred()) - _ = b - } - }) -}) -