Skip to content

Commit d8ee02e

Browse files
authored
chore(tests): simplify tests and run intensive ones only once
Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
1 parent 2d2e875 commit d8ee02e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

core/http/app_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,13 +956,19 @@ parameters:
956956
Expect(len(models.Models)).To(Equal(7)) // If "config.yaml" should be included, this should be 8?
957957
})
958958
It("can generate completions via ggml", func() {
959+
if runtime.GOOS != "linux" {
960+
Skip("test supported only on linux")
961+
}
959962
resp, err := client.CreateCompletion(context.TODO(), openai.CompletionRequest{Model: "testmodel.ggml", Prompt: testPrompt})
960963
Expect(err).ToNot(HaveOccurred())
961964
Expect(len(resp.Choices)).To(Equal(1))
962965
Expect(resp.Choices[0].Text).ToNot(BeEmpty())
963966
})
964967

965968
It("can generate chat completions via ggml", func() {
969+
if runtime.GOOS != "linux" {
970+
Skip("test supported only on linux")
971+
}
966972
resp, err := client.CreateChatCompletion(context.TODO(), openai.ChatCompletionRequest{Model: "testmodel.ggml", Messages: []openai.ChatCompletionMessage{openai.ChatCompletionMessage{Role: "user", Content: testPrompt}}})
967973
Expect(err).ToNot(HaveOccurred())
968974
Expect(len(resp.Choices)).To(Equal(1))

0 commit comments

Comments
 (0)